Restore preempt_forbid_cnt as private; supply an accessor macro.
[bertos.git] / bertos / kern / signal.c
index 948d68f1d814c687e8edb805b047da4596975242..9785958d2dc2fcc863efce13f7c824b6c17c8dcc 100644 (file)
@@ -139,10 +139,7 @@ sigmask_t sig_wait(sigmask_t sigs)
 
        /* Sleeping with IRQs disabled or preemption forbidden is illegal */
        IRQ_ASSERT_ENABLED();
-
-       #if CONFIG_KERN_PREEMPT
-       ASSERT(preempt_forbid_cnt == 0);
-       #endif
+       ASSERT(proc_allowed());
 
        /*
         * This is subtle: there's a race condition where a concurrent