1 #include <minix/timers.h>
4 * Deactivate a timer and remove it from the timers queue. 'tmrs' is a pointer
5 * to the timers queue. 'tp' is a pointer to the timer to be removed, which
6 * generally should be on the queue (but this is not a requirement, and the
7 * kernel abuses this). If 'prev_time' is non-NULL, it is filled with the
8 * previous timer head time, which always exists since at least 'tp' is on it.
9 * The function returns TRUE if there is still at least one timer on the queue
10 * after this function is done, in which case 'next_time' (if non-NULL) is
11 * filled with the absolute expiry time of the new head timer.
14 tmrs_clrtimer(minix_timer_t
** tmrs
, minix_timer_t
* tp
, clock_t * prev_time
,
21 if (prev_time
!= NULL
)
22 *prev_time
= (*tmrs
)->tmr_exp_time
;
27 tp
->tmr_func
= NULL
; /* clear the timer object */
29 for (atp
= tmrs
; *atp
!= NULL
; atp
= &(*atp
)->tmr_next
) {
36 if (next_time
!= NULL
) {
38 *next_time
= (*tmrs
)->tmr_exp_time
;