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,9 +35,21 @@ 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 * diff --git a/src/net/retry.c b/src/net/retry.c index 90b89711..3c934018 100644 --- a/src/net/retry.c +++ b/src/net/retry.c @@ -74,15 +74,14 @@ void start_timer ( struct retry_timer *timer ) { } /** - * Start timer with no delay + * Start timer with a specified fixed timeout * * @v timer Retry timer - * - * This starts the timer running with a zero timeout value. + * @v timeout Timeout, in ticks */ -void start_timer_nodelay ( struct retry_timer *timer ) { +void start_timer_fixed ( struct retry_timer *timer, unsigned long timeout ) { start_timer ( timer ); - timer->timeout = 0; + timer->timeout = timeout; } /**