From a90e974f2dedd4a9c469f20ae8e009839261351f Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 26 Feb 2016 02:25:20 +0100 Subject: Document thread_sleep about events woken from interrupt handlers * kern/sched_prim.c (thread_sleep): Document case of events woken from interrupt handlers. --- kern/sched_prim.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kern/sched_prim.c') 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, -- cgit v1.2.3