2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-11-22 17:41:55 +00:00

[retry] Add TIMER_INIT() for initialising static timers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2010-09-06 22:16:21 +01:00
parent e9efbcd84c
commit 0f65efc185

View File

@ -72,6 +72,15 @@ timer_init ( struct retry_timer *timer,
timer->refcnt = refcnt;
}
/**
* Initialise a static timer
*
* @v expired_fn Timer expired callback
*/
#define TIMER_INIT( expired_fn ) { \
.expired = (expired_fn), \
}
extern void start_timer ( struct retry_timer *timer );
extern void start_timer_fixed ( struct retry_timer *timer,
unsigned long timeout );