Explorar el Código

Add start_timer_nodelay()

tags/v0.9.3
Michael Brown hace 17 años
padre
commit
0a3c2b80ea
Se han modificado 2 ficheros con 13 adiciones y 0 borrados
  1. 1
    0
      src/include/gpxe/retry.h
  2. 12
    0
      src/net/retry.c

+ 1
- 0
src/include/gpxe/retry.h Ver fichero

@@ -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 Ver fichero

@@ -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
  *

Loading…
Cancelar
Guardar