diff options
Diffstat (limited to 'contrib/bind9/lib/isc/timer.c')
-rw-r--r-- | contrib/bind9/lib/isc/timer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/bind9/lib/isc/timer.c b/contrib/bind9/lib/isc/timer.c index ab89cdd..71473fb 100644 --- a/contrib/bind9/lib/isc/timer.c +++ b/contrib/bind9/lib/isc/timer.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: timer.c,v 1.95.302.1.2.1 2011-06-02 23:47:36 tbox Exp $ */ +/* $Id: timer.c,v 1.95.302.3 2011-03-11 06:47:08 marka Exp $ */ /*! \file */ @@ -333,7 +333,9 @@ schedule(isc__timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) { static inline void deschedule(isc__timer_t *timer) { +#ifdef USE_TIMER_THREAD isc_boolean_t need_wakeup = ISC_FALSE; +#endif isc__timermgr_t *manager; /* @@ -342,8 +344,10 @@ deschedule(isc__timer_t *timer) { manager = timer->manager; if (timer->index > 0) { +#ifdef USE_TIMER_THREAD if (timer->index == 1) need_wakeup = ISC_TRUE; +#endif isc_heap_delete(manager->heap, timer->index); timer->index = 0; INSIST(manager->nscheduled > 0); @@ -527,6 +531,7 @@ isc__timer_reset(isc_timer_t *timer0, isc_timertype_t type, REQUIRE(VALID_TIMER(timer)); manager = timer->manager; REQUIRE(VALID_MANAGER(manager)); + if (expires == NULL) expires = isc_time_epoch; if (interval == NULL) @@ -550,8 +555,6 @@ isc__timer_reset(isc_timer_t *timer0, isc_timertype_t type, isc_time_settoepoch(&now); } - manager = timer->manager; - LOCK(&manager->lock); LOCK(&timer->lock); |