diff options
author | Flávio Cruz <flaviocruz@gmail.com> | 2015-08-28 01:19:32 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-08-28 01:22:58 +0200 |
commit | eec39c5f50fb1b4e2025025773f77293f3466492 (patch) | |
tree | a5fbaff9a8edec55ed9193e1bda3b429b8975e54 /kern/machine.c | |
parent | 0bae7342bf2275a210117bbcc4fa5a13523eaa81 (diff) |
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.
Diffstat (limited to 'kern/machine.c')
-rw-r--r-- | kern/machine.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kern/machine.c b/kern/machine.c index eced768..3f7a7f7 100644 --- a/kern/machine.c +++ b/kern/machine.c @@ -270,7 +270,7 @@ Retry: assert_wait((event_t) processor, TRUE); processor_unlock(processor); splx(s); - thread_block((void(*)()) 0); + thread_block(thread_no_continuation); goto Retry; } @@ -299,7 +299,7 @@ Retry: assert_wait((event_t)processor, TRUE); processor_unlock(processor); splx(s); - thread_block((void (*)()) 0); + thread_block(thread_no_continuation); s = splsched(); processor_lock(processor); } @@ -415,7 +415,7 @@ void processor_doaction(processor_t processor) */ this_thread = current_thread(); thread_bind(this_thread, processor); - thread_block((void (*)()) 0); + thread_block(thread_no_continuation); pset = processor->processor_set; #if MACH_HOST @@ -572,7 +572,7 @@ Restart_pset: thread_deallocate(prev_thread); thread_bind(this_thread, PROCESSOR_NULL); - thread_block((void (*)()) 0); + thread_block(thread_no_continuation); return; } |