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/task.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kern/task.c') diff --git a/kern/task.c b/kern/task.c index 9a3d8482..e9e6ba24 100644 --- a/kern/task.c +++ b/kern/task.c @@ -377,7 +377,7 @@ kern_return_t task_terminate( task_unlock(task); thread_force_terminate(thread); thread_deallocate(thread); - thread_block((void (*)()) 0); + thread_block(thread_no_continuation); task_lock(task); } task_unlock(task); @@ -893,7 +893,7 @@ task_assign( task->assign_active = TRUE; assert_wait((event_t)&task->assign_active, TRUE); task_unlock(task); - thread_block((void (*)()) 0); + thread_block(thread_no_continuation); task_lock(task); } -- cgit v1.2.3