]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[retry] Expose retry_poll() to explicitly poll all running timers
authorMichael Brown <mcb30@ipxe.org>
Fri, 31 Aug 2012 18:50:56 +0000 (19:50 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 31 Aug 2012 19:21:15 +0000 (20:21 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/retry.h
src/net/retry.c

index 87f69a5d75edbad1dc0a0dcdc7bf8283a7c3c3c0..c514822b2940a12390e959ecb9a686705cf8a0d6 100644 (file)
@@ -85,6 +85,7 @@ extern void start_timer ( struct retry_timer *timer );
 extern void start_timer_fixed ( struct retry_timer *timer,
                                unsigned long timeout );
 extern void stop_timer ( struct retry_timer *timer );
+extern void retry_poll ( void );
 
 /**
  * Start timer with no delay
index 4f43b76f9922bc2b60d7cf725276e9453695eaba..8f210bdcc45d512da87b3689861df33dcb2b6f78 100644 (file)
@@ -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;
        unsigned long now = currticks();
        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 */
 PERMANENT_PROCESS ( retry_process, retry_step );