DB(t.magic = TIMER_MAGIC_INACTIVE;)
if (proc_preemptAllowed())
{
- ASSERT(!sig_check(SIG_SINGLE));
- timer_setSignal(&t, proc_current(), SIG_SINGLE);
+ timer_setEvent(&t);
timer_setDelay(&t, delay);
timer_add(&t);
- sig_wait(SIG_SINGLE);
+ timer_waitEvent(&t);
}
else
#endif /* !CONFIG_KERN_SIGNALS */
#if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS
+/** Set the timer so that it sends a event notification when it expires */
+INLINE void timer_setEvent(Timer *timer)
+{
+ event_initGeneric(&timer->expire);
+}
+
+/** Wait until the timer expires */
+INLINE void timer_waitEvent(Timer *timer)
+{
+ event_wait(&timer->expire);
+}
+
/** Set the timer so that it sends a signal when it expires */
INLINE void timer_setSignal(Timer *timer, struct Process *proc, sigmask_t sigs)
{