isc_task_t *task, isc_taskaction_t action, void *arg,
isc_timer_t **timerp)
{
- isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
+ REQUIRE(VALID_MANAGER(manager0));
+ REQUIRE(task != NULL);
+ REQUIRE(action != NULL);
+
+ isc__timermgr_t *manager;
isc__timer_t *timer;
isc_result_t result;
isc_time_t now;
* called with 'arg' as the arg value. The new timer is returned
* in 'timerp'.
*/
-
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
+ manager = (isc__timermgr_t *)manager0;
if (expires == NULL)
expires = isc_time_epoch;
if (interval == NULL)
const isc_time_t *expires, const isc_interval_t *interval,
bool purge)
{
- isc__timer_t *timer = (isc__timer_t *)timer0;
+ isc__timer_t *timer;
isc_time_t now;
isc__timermgr_t *manager;
isc_result_t result;
* are purged from its task's event queue.
*/
- REQUIRE(VALID_TIMER(timer));
+ REQUIRE(VALID_TIMER(timer0));
+ timer = (isc__timer_t *)timer0;
manager = timer->manager;
REQUIRE(VALID_MANAGER(manager));
isc_timertype_t
isc_timer_gettype(isc_timer_t *timer0) {
- isc__timer_t *timer = (isc__timer_t *)timer0;
+ isc__timer_t *timer;
isc_timertype_t t;
- REQUIRE(VALID_TIMER(timer));
+ REQUIRE(VALID_TIMER(timer0));
+ timer = (isc__timer_t *)timer0;
LOCK(&timer->lock);
t = timer->type;
isc_result_t
isc_timer_touch(isc_timer_t *timer0) {
- isc__timer_t *timer = (isc__timer_t *)timer0;
+ isc__timer_t *timer;
isc_result_t result;
isc_time_t now;
* Set the last-touched time of 'timer' to the current time.
*/
- REQUIRE(VALID_TIMER(timer));
+ REQUIRE(VALID_TIMER(timer0));
+ timer = (isc__timer_t *)timer0;
LOCK(&timer->lock);
void
isc_timer_attach(isc_timer_t *timer0, isc_timer_t **timerp) {
- isc__timer_t *timer = (isc__timer_t *)timer0;
+ isc__timer_t *timer;
/*
* Attach *timerp to timer.
*/
- REQUIRE(VALID_TIMER(timer));
+ REQUIRE(VALID_TIMER(timer0));
+ timer = (isc__timer_t *)timer0;
REQUIRE(timerp != NULL && *timerp == NULL);
isc_refcount_increment(&timer->references);
set_index(void *what, unsigned int index) {
isc__timer_t *timer;
+ REQUIRE(VALID_TIMER(what));
timer = what;
- REQUIRE(VALID_TIMER(timer));
timer->index = index;
}
void
isc_timermgr_poke(isc_timermgr_t *manager0) {
- isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
+ isc__timermgr_t *manager;
- REQUIRE(VALID_MANAGER(manager));
+ REQUIRE(VALID_MANAGER(manager0));
+ manager = (isc__timermgr_t *)manager0;
SIGNAL(&manager->wakeup);
}