Przeglądaj źródła

Add start_timer_nodelay()

tags/v0.9.3
Michael Brown 17 lat temu
rodzic
commit
0a3c2b80ea
2 zmienionych plików z 13 dodań i 0 usunięć
  1. 1
    0
      src/include/gpxe/retry.h
  2. 12
    0
      src/net/retry.c

+ 1
- 0
src/include/gpxe/retry.h Wyświetl plik

@@ -35,6 +35,7 @@ struct retry_timer {
35 35
 };
36 36
 
37 37
 extern void start_timer ( struct retry_timer *timer );
38
+extern void start_timer_nodelay ( struct retry_timer *timer );
38 39
 extern void stop_timer ( struct retry_timer *timer );
39 40
 
40 41
 /**

+ 12
- 0
src/net/retry.c Wyświetl plik

@@ -73,6 +73,18 @@ void start_timer ( struct retry_timer *timer ) {
73 73
 	       timer, timer->start, ( timer->start + timer->timeout ) );
74 74
 }
75 75
 
76
+/**
77
+ * Start timer with no delay
78
+ *
79
+ * @v timer		Retry timer
80
+ *
81
+ * This starts the timer running with a zero timeout value.
82
+ */
83
+void start_timer_nodelay ( struct retry_timer *timer ) {
84
+	start_timer ( timer );
85
+	timer->timeout = 0;
86
+}
87
+
76 88
 /**
77 89
  * Stop timer
78 90
  *

Ładowanie…
Anuluj
Zapisz