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:
parent
e9efbcd84c
commit
0f65efc185
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user