proc_forbid(): extensively document why we don't need locking
[bertos.git] / bertos / kern / signal.c
index d4fe178ed75567c21348dc72b1665eb477a608a3..9785958d2dc2fcc863efce13f7c824b6c17c8dcc 100644 (file)
@@ -136,11 +136,10 @@ sigmask_t sig_wait(sigmask_t sigs)
 {
        sigmask_t result;
        cpuflags_t flags;
-       extern int preempt_forbid_cnt;
 
        /* Sleeping with IRQs disabled or preemption forbidden is illegal */
        IRQ_ASSERT_ENABLED();
-       ASSERT(preempt_forbid_cnt == 0);
+       ASSERT(proc_allowed());
 
        /*
         * This is subtle: there's a race condition where a concurrent