Invert test on moc success
[bertos.git] / kern / signal.c
index ffb27cda4052d1c0ecb4971932fa5ee81c06a1f7..f0026f2353826da4cc04bb4c8b1000b2e86db63e 100644 (file)
@@ -161,7 +161,7 @@ sigmask_t sig_waitTimeout(sigmask_t sigs, ticks_t timeout)
 
        ASSERT(!sig_check(SIG_TIMEOUT));
        ASSERT(!(sigs & SIG_TIMEOUT));
-       /* IRQ are needed to run timer */
+       /* IRQ are needed to run timer */
        ASSERT(IRQ_ENABLED());
 
        timer_set_event_signal(&t, proc_current(), SIG_TIMEOUT);
@@ -174,6 +174,7 @@ sigmask_t sig_waitTimeout(sigmask_t sigs, ticks_t timeout)
        if (!(res & SIG_TIMEOUT) && !sig_check(SIG_TIMEOUT))
                timer_abort(&t);
        IRQ_RESTORE(flags);
+       return res;
 }