Selaa lähdekoodia

[retry] Expose retry_poll() to explicitly poll all running timers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 vuotta sitten
vanhempi
commit
de802310bc
2 muutettua tiedostoa jossa 12 lisäystä ja 3 poistoa
  1. 1
    0
      src/include/ipxe/retry.h
  2. 11
    3
      src/net/retry.c

+ 1
- 0
src/include/ipxe/retry.h Näytä tiedosto

@@ -85,6 +85,7 @@ extern void start_timer ( struct retry_timer *timer );
85 85
 extern void start_timer_fixed ( struct retry_timer *timer,
86 86
 				unsigned long timeout );
87 87
 extern void stop_timer ( struct retry_timer *timer );
88
+extern void retry_poll ( void );
88 89
 
89 90
 /**
90 91
  * Start timer with no delay

+ 11
- 3
src/net/retry.c Näytä tiedosto

@@ -177,11 +177,10 @@ static void timer_expired ( struct retry_timer *timer ) {
177 177
 }
178 178
 
179 179
 /**
180
- * Single-step the retry timer list
180
+ * Poll the retry timer list
181 181
  *
182
- * @v process		Retry timer process
183 182
  */
184
-static void retry_step ( struct process *process __unused ) {
183
+void retry_poll ( void ) {
185 184
 	struct retry_timer *timer;
186 185
 	unsigned long now = currticks();
187 186
 	unsigned long used;
@@ -200,5 +199,14 @@ static void retry_step ( struct process *process __unused ) {
200 199
 	}
201 200
 }
202 201
 
202
+/**
203
+ * Single-step the retry timer list
204
+ *
205
+ * @v process		Retry timer process
206
+ */
207
+static void retry_step ( struct process *process __unused ) {
208
+	retry_poll();
209
+}
210
+
203 211
 /** Retry timer process */
204 212
 PERMANENT_PROCESS ( retry_process, retry_step );

Loading…
Peruuta
Tallenna