mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Remove isc_timertype_limited from isc_timer API
The isc_timertype_limited timer type was never used (not even in tests). Remove isc_timertype_limited timer type before planned refactoring.
This commit is contained in:
parent
c752dff3b4
commit
bbe1c06a8b
2 changed files with 0 additions and 25 deletions
|
|
@ -29,9 +29,6 @@
|
|||
* They are used to implement both (possibly expiring) idle timers and
|
||||
* 'one-shot' timers.
|
||||
*
|
||||
*\li 'limited' timers generate a periodic tick event until they reach
|
||||
* their lifetime when they generate a life timeout event.
|
||||
*
|
||||
*\li 'inactive' timers generate no events.
|
||||
*
|
||||
* Timers can change type. It is typical to create a timer as
|
||||
|
|
@ -83,7 +80,6 @@ typedef enum {
|
|||
isc_timertype_undefined = -1, /*%< Undefined */
|
||||
isc_timertype_ticker = 0, /*%< Ticker */
|
||||
isc_timertype_once = 1, /*%< Once */
|
||||
isc_timertype_limited = 2, /*%< Limited */
|
||||
isc_timertype_inactive = 3 /*%< Inactive */
|
||||
} isc_timertype_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -116,11 +116,6 @@ schedule(isc_timer_t *timer, isc_time_t *now, bool signal_ok) {
|
|||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
if (timer->type == isc_timertype_limited &&
|
||||
isc_time_compare(&timer->expires, &due) < 0)
|
||||
{
|
||||
due = timer->expires;
|
||||
}
|
||||
} else {
|
||||
if (isc_time_isepoch(&timer->idle)) {
|
||||
due = timer->expires;
|
||||
|
|
@ -256,8 +251,6 @@ isc_timer_create(isc_timermgr_t *manager, isc_timertype_t type,
|
|||
REQUIRE(type == isc_timertype_inactive ||
|
||||
!(isc_time_isepoch(expires) && isc_interval_iszero(interval)));
|
||||
REQUIRE(timerp != NULL && *timerp == NULL);
|
||||
REQUIRE(type != isc_timertype_limited ||
|
||||
!(isc_time_isepoch(expires) || isc_interval_iszero(interval)));
|
||||
|
||||
/*
|
||||
* Get current time.
|
||||
|
|
@ -366,8 +359,6 @@ isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
|
|||
}
|
||||
REQUIRE(type == isc_timertype_inactive ||
|
||||
!(isc_time_isepoch(expires) && isc_interval_iszero(interval)));
|
||||
REQUIRE(type != isc_timertype_limited ||
|
||||
!(isc_time_isepoch(expires) || isc_interval_iszero(interval)));
|
||||
|
||||
/*
|
||||
* Get current time.
|
||||
|
|
@ -508,18 +499,6 @@ dispatch(isc_timermgr_t *manager, isc_time_t *now) {
|
|||
type = ISC_TIMEREVENT_TICK;
|
||||
post_event = true;
|
||||
need_schedule = true;
|
||||
} else if (timer->type == isc_timertype_limited) {
|
||||
int cmp;
|
||||
cmp = isc_time_compare(now, &timer->expires);
|
||||
if (cmp >= 0) {
|
||||
type = ISC_TIMEREVENT_LIFE;
|
||||
post_event = true;
|
||||
need_schedule = false;
|
||||
} else {
|
||||
type = ISC_TIMEREVENT_TICK;
|
||||
post_event = true;
|
||||
need_schedule = true;
|
||||
}
|
||||
} else if (!isc_time_isepoch(&timer->expires) &&
|
||||
isc_time_compare(now, &timer->expires) >= 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue