summaryrefslogtreecommitdiff
path: root/kern/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/thread.c')
-rw-r--r--kern/thread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kern/thread.c b/kern/thread.c
index 41d996b4..14070d92 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -355,6 +355,8 @@ static void
thread_set_wchan(struct thread *thread, const void *wchan_addr,
const char *wchan_desc)
{
+ assert((wchan_addr != NULL) && (wchan_desc != NULL));
+
thread->wchan_addr = wchan_addr;
thread->wchan_desc = wchan_desc;
}
@@ -362,7 +364,8 @@ thread_set_wchan(struct thread *thread, const void *wchan_addr,
static void
thread_clear_wchan(struct thread *thread)
{
- thread_set_wchan(thread, NULL, NULL);
+ thread->wchan_addr = NULL;
+ thread->wchan_desc = NULL;
}
static const struct thread_sched_ops *