* When the delay indicated by the timer expires, the timer
* device will execute the event associated with it.
*
+ * You should not call this function on an already running timer.
+ *
* \note Interrupt safe
*/
void timer_add(Timer *timer)
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 */