summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kern/thread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kern/thread.c b/kern/thread.c
index 1631d9a5..741344ba 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -345,6 +345,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;
}
@@ -352,7 +354,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 *