X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftimer.h;h=06f19ed31ca73076091d3b9f3d6b6a46c1058f95;hb=f0c6ef0573ea9487ce6852249828cfd39cdae6bf;hp=a68ee5b21dd9703735582fdad4c701ea7f10ec69;hpb=11bd07ba56015a0ad55fc0cb3b41d0757dcdc03f;p=bertos.git diff --git a/bertos/drv/timer.h b/bertos/drv/timer.h index a68ee5b2..06f19ed3 100644 --- a/bertos/drv/timer.h +++ b/bertos/drv/timer.h @@ -310,6 +310,18 @@ void synctimer_poll(List* q); #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) {