From eec39c5f50fb1b4e2025025773f77293f3466492 Mon Sep 17 00:00:00 2001 From: Flávio Cruz Date: Fri, 28 Aug 2015 01:19:32 +0200 Subject: Add a thread_no_continuation definition to replace the use of the NULL pointer. * kern/sched_prim.h (thread_no_continuation): New macro. * kern/machine.c (processor_assign, processor_doaction): Use thread_no_continuation instead of 0. * kern/profile.c (send_last_sample_buf): Likewise * kern/sched_prim.c (thread_sleep, thread_invoke, thread_dispatch): Likewise. * kern/task.c (task_terminate, task_assign): Likewise. * kern/thread.c (thread_suspend): Likewise. * kern/thread.h (struct thread): Change type of swap_func field to continuation_t. --- kern/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kern/thread.c') diff --git a/kern/thread.c b/kern/thread.c index 865a1cc..c638075 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -1348,7 +1348,7 @@ kern_return_t thread_suspend( while (thread->state & TH_UNINT) { assert_wait(TH_EV_STATE(thread), TRUE); thread_unlock(thread); - thread_block(NULL); + thread_block(thread_no_continuation); thread_lock(thread); } if (thread->user_stop_count++ == 0) { -- cgit v1.2.3