summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
Diffstat (limited to 'kern')
-rw-r--r--kern/thread.c3
-rw-r--r--kern/thread_i.h5
2 files changed, 4 insertions, 4 deletions
diff --git a/kern/thread.c b/kern/thread.c
index b6a44bb8..c04635b5 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -1833,7 +1833,7 @@ thread_init(struct thread *thread, void *stack,
thread->flags |= THREAD_DETACHED;
}
- error = tcb_init(&thread->tcb, stack, fn, arg);
+ error = tcb_build(&thread->tcb, stack, fn, arg);
if (error) {
goto error_tcb;
@@ -1964,6 +1964,7 @@ thread_destroy(struct thread *thread)
turnstile_destroy(thread->priv_turnstile);
sleepq_destroy(thread->priv_sleepq);
thread_free_stack(thread->stack);
+ tcb_cleanup(&thread->tcb);
kmem_cache_free(&thread_cache, thread);
}
diff --git a/kern/thread_i.h b/kern/thread_i.h
index 4218b50b..c8a85f57 100644
--- a/kern/thread_i.h
+++ b/kern/thread_i.h
@@ -168,10 +168,9 @@ struct thread {
};
/*
- * Thread-specific data should only be used by architecture-dependent code.
- * For machine-independent code, new member variables should be added.
+ * Thread-specific data.
*
- * TODO move those to the TCB and remove.
+ * TODO Make optional.
*/
void *tsd[THREAD_KEYS_MAX];