summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/retry.h
diff options
context:
space:
mode:
authorMichael Brown2008-06-11 10:37:58 +0200
committerMichael Brown2008-06-11 10:37:58 +0200
commit32e8ab4df028248665456e3d6a42e1285b332291 (patch)
tree16e093fbd2a880049c535093edb945e4451c415e /src/include/gpxe/retry.h
parent[dhcp] Do not transition to DHCPREQUEST without a valid DHCPOFFER (diff)
downloadipxe-32e8ab4df028248665456e3d6a42e1285b332291.tar.gz
ipxe-32e8ab4df028248665456e3d6a42e1285b332291.tar.xz
ipxe-32e8ab4df028248665456e3d6a42e1285b332291.zip
[retry] Add start_timer_fixed()
Allow for timers to be started with fixed timeouts.
Diffstat (limited to 'src/include/gpxe/retry.h')
-rw-r--r--src/include/gpxe/retry.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/include/gpxe/retry.h b/src/include/gpxe/retry.h
index e71e7b3b..71982fca 100644
--- a/src/include/gpxe/retry.h
+++ b/src/include/gpxe/retry.h
@@ -35,10 +35,22 @@ struct retry_timer {
};
extern void start_timer ( struct retry_timer *timer );
-extern void start_timer_nodelay ( struct retry_timer *timer );
+extern void start_timer_fixed ( struct retry_timer *timer,
+ unsigned long timeout );
extern void stop_timer ( struct retry_timer *timer );
/**
+ * Start timer with no delay
+ *
+ * @v timer Retry timer
+ *
+ * This starts the timer running with a zero timeout value.
+ */
+static inline void start_timer_nodelay ( struct retry_timer *timer ) {
+ start_timer_fixed ( timer, 0 );
+}
+
+/**
* Test to see if timer is currently running
*
* @v timer Retry timer