diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-12-12 14:36:02 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-12-14 13:56:44 -0800 |
commit | e2ab9215d792d07cfb725de290f416e331b87627 (patch) | |
tree | 7fbf2b3f921ef78b277f5d89c1a9a14960a49edc /gpxe/src/net/retry.c | |
parent | 36390f9712ac56be1dce7a635322bd96e15620c1 (diff) | |
download | syslinux-kkpxe.tar.gz |
gPXE: update to the "kkpxe" branchkkpxe
Update gPXE to the "kkpxe" branch, an experimental branch of the gPXE
tree which should let us eliminate the gpxelinux-specific hacks.
Specifically, this corresponds to checkin
0963c883a9402bd5846e687a100e196f7e8a2ef7 of
git://git.etherboot.org/scm/people/mcb30/gpxe.git.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpxe/src/net/retry.c')
-rw-r--r-- | gpxe/src/net/retry.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gpxe/src/net/retry.c b/gpxe/src/net/retry.c index 2a645c97..cd793a7f 100644 --- a/gpxe/src/net/retry.c +++ b/gpxe/src/net/retry.c @@ -55,9 +55,10 @@ static LIST_HEAD ( timers ); * be stopped and the timer's callback function will be called. */ void start_timer ( struct retry_timer *timer ) { - if ( ! timer_running ( timer ) ) + if ( ! timer->running ) list_add ( &timer->list, &timers ); timer->start = currticks(); + timer->running = 1; /* 0 means "use default timeout" */ if ( timer->min_timeout == 0 ) @@ -82,6 +83,8 @@ void start_timer ( struct retry_timer *timer ) { void start_timer_fixed ( struct retry_timer *timer, unsigned long timeout ) { start_timer ( timer ); timer->timeout = timeout; + DBG2 ( "Timer %p expiry time changed to %ld\n", + timer, ( timer->start + timer->timeout ) ); } /** @@ -97,12 +100,12 @@ void stop_timer ( struct retry_timer *timer ) { unsigned long runtime; /* If timer was already stopped, do nothing */ - if ( ! timer_running ( timer ) ) + if ( ! timer->running ) return; list_del ( &timer->list ); runtime = ( now - timer->start ); - timer->start = 0; + timer->running = 0; DBG2 ( "Timer %p stopped at time %ld (ran for %ld)\n", timer, now, runtime ); @@ -144,8 +147,9 @@ static void timer_expired ( struct retry_timer *timer ) { /* Stop timer without performing RTT calculations */ DBG2 ( "Timer %p stopped at time %ld on expiry\n", timer, currticks() ); + assert ( timer->running ); list_del ( &timer->list ); - timer->start = 0; + timer->running = 0; timer->count++; /* Back off the timeout value */ |