mirror of https://github.com/ipxe/ipxe.git
[retry] Expose retry_poll() to explicitly poll all running timers
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/598/head
parent
1cbb1581f1
commit
de802310bc
|
@ -85,6 +85,7 @@ extern void start_timer ( struct retry_timer *timer );
|
||||||
extern void start_timer_fixed ( struct retry_timer *timer,
|
extern void start_timer_fixed ( struct retry_timer *timer,
|
||||||
unsigned long timeout );
|
unsigned long timeout );
|
||||||
extern void stop_timer ( struct retry_timer *timer );
|
extern void stop_timer ( struct retry_timer *timer );
|
||||||
|
extern void retry_poll ( void );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start timer with no delay
|
* Start timer with no delay
|
||||||
|
|
|
@ -177,11 +177,10 @@ static void timer_expired ( struct retry_timer *timer ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Single-step the retry timer list
|
* Poll the retry timer list
|
||||||
*
|
*
|
||||||
* @v process Retry timer process
|
|
||||||
*/
|
*/
|
||||||
static void retry_step ( struct process *process __unused ) {
|
void retry_poll ( void ) {
|
||||||
struct retry_timer *timer;
|
struct retry_timer *timer;
|
||||||
unsigned long now = currticks();
|
unsigned long now = currticks();
|
||||||
unsigned long used;
|
unsigned long used;
|
||||||
|
@ -200,5 +199,14 @@ static void retry_step ( struct process *process __unused ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Single-step the retry timer list
|
||||||
|
*
|
||||||
|
* @v process Retry timer process
|
||||||
|
*/
|
||||||
|
static void retry_step ( struct process *process __unused ) {
|
||||||
|
retry_poll();
|
||||||
|
}
|
||||||
|
|
||||||
/** Retry timer process */
|
/** Retry timer process */
|
||||||
PERMANENT_PROCESS ( retry_process, retry_step );
|
PERMANENT_PROCESS ( retry_process, retry_step );
|
||||||
|
|
Loading…
Reference in New Issue