X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fsignal.c;h=2f72c47906d6bf74899a55a03bedc63bd9912064;hb=8f98ebb808578ccfef32b52dae753510e284fc9d;hp=71ccf67ada7dd6090ecc5a1420a7580567dda67d;hpb=2d0d0a3260be3a5dda727a7b52d38d8bb8637ced;p=bertos.git diff --git a/bertos/kern/signal.c b/bertos/kern/signal.c index 71ccf67a..2f72c479 100644 --- a/bertos/kern/signal.c +++ b/bertos/kern/signal.c @@ -122,7 +122,6 @@ * - Do not call system functions that may implicitly sleep, such as * timer_delayTicks(). * - * \version $Id$ * \author Bernie Innocenti */ @@ -251,9 +250,6 @@ INLINE void __sig_signal(Process *proc, sigmask_t sigs, bool wakeup) { cpu_flags_t flags; - if (UNLIKELY(proc == current_process)) - return; - IRQ_SAVE_DISABLE(flags); /* Set the signals */ @@ -262,6 +258,8 @@ INLINE void __sig_signal(Process *proc, sigmask_t sigs, bool wakeup) /* Check if process needs to be awoken */ if (proc->sig_recv & proc->sig_wait) { + ASSERT(proc != current_process); + proc->sig_wait = 0; if (wakeup) proc_wakeup(proc);