tmrs_exp.c
来自「minix操作系统最新版本(3.1.1)的源代码」· C语言 代码 · 共 32 行
C
32 行
#include "timers.h"/*===========================================================================* * tmrs_exptimers * *===========================================================================*/void tmrs_exptimers(tmrs, now, new_head)timer_t **tmrs; /* pointer to timers queue */clock_t now; /* current time */clock_t *new_head;{/* Use the current time to check the timers queue list for expired timers. * Run the watchdog functions for all expired timers and deactivate them. * The caller is responsible for scheduling a new alarm if needed. */ timer_t *tp; while ((tp = *tmrs) != NULL && tp->tmr_exp_time <= now) { *tmrs = tp->tmr_next; tp->tmr_exp_time = TMR_NEVER; (*tp->tmr_func)(tp); } if(new_head) { if(*tmrs) *new_head = (*tmrs)->tmr_exp_time; else *new_head = 0; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?