tools/llvm: Do not build with symbols
[minix3.git] / minix / lib / libtimers / tmrs_exp.c
blobd54ca839f00549039f81606854fff44e032b99fd
1 #include "timers.h"
3 /*===========================================================================*
4 * tmrs_exptimers *
5 *===========================================================================*/
6 void tmrs_exptimers(tmrs, now, new_head)
7 minix_timer_t **tmrs; /* pointer to timers queue */
8 clock_t now; /* current time */
9 clock_t *new_head;
11 /* Use the current time to check the timers queue list for expired timers.
12 * Run the watchdog functions for all expired timers and deactivate them.
13 * The caller is responsible for scheduling a new alarm if needed.
15 minix_timer_t *tp;
17 while ((tp = *tmrs) != NULL && tp->tmr_exp_time <= now) {
18 *tmrs = tp->tmr_next;
19 tp->tmr_exp_time = TMR_NEVER;
20 (*tp->tmr_func)(tp);
23 if(new_head) {
24 if(*tmrs)
25 *new_head = (*tmrs)->tmr_exp_time;
26 else
27 *new_head = 0;