summaryrefslogtreecommitdiff
path: root/kern/sched_prim.h
diff options
context:
space:
mode:
authorFlávio Cruz <flaviocruz@gmail.com>2015-08-28 01:19:32 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-08-28 01:22:58 +0200
commiteec39c5f50fb1b4e2025025773f77293f3466492 (patch)
treea5fbaff9a8edec55ed9193e1bda3b429b8975e54 /kern/sched_prim.h
parent0bae7342bf2275a210117bbcc4fa5a13523eaa81 (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/sched_prim.h')
-rw-r--r--kern/sched_prim.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kern/sched_prim.h b/kern/sched_prim.h
index 62698dc2..bb1865cd 100644
--- a/kern/sched_prim.h
+++ b/kern/sched_prim.h
@@ -52,6 +52,8 @@ typedef void *event_t; /* wait event */
typedef void (*continuation_t)(void); /* continuation */
+#define thread_no_continuation ((continuation_t) 0) /* no continuation */
+
/*
* Exported interface to sched_prim.c.
*/