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/task.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/task.c')
-rw-r--r-- | kern/task.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kern/task.c b/kern/task.c index 9a3d848..e9e6ba2 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); } |