summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-02-26 02:25:20 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-02-26 02:25:20 +0100
commita90e974f2dedd4a9c469f20ae8e009839261351f (patch)
treee230b92f735feb897a05347ade41687c8793ed0d
parentdef510d20a47ce28f6b8b494f9212f9ee394aae2 (diff)
Document thread_sleep about events woken from interrupt handlers
* kern/sched_prim.c (thread_sleep): Document case of events woken from interrupt handlers.
-rw-r--r--kern/sched_prim.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kern/sched_prim.c b/kern/sched_prim.c
index 580ca438..0cef1601 100644
--- a/kern/sched_prim.c
+++ b/kern/sched_prim.c
@@ -446,6 +446,9 @@ void thread_wakeup_prim(
* occurs. The specified lock is unlocked before releasing
* the cpu. (This is a convenient way to sleep without manually
* calling assert_wait).
+ *
+ * Note: if the event may be woken from an interrupt handler, this must be
+ * called at an spl level that prevents such interrupts.
*/
void thread_sleep(
event_t event,