void * ev_sender; \
isc_eventdestructor_t ev_destroy; \
void * ev_destroy_arg; \
- ISC_LINK(ltype) ev_link
+ ISC_LINK(ltype) ev_link; \
+ ISC_LINK(ltype) ev_ratelink;
/*%
* Attributes matching a mask of 0x000000ff are reserved for the task library's
(event)->ev_destroy = (df); \
(event)->ev_destroy_arg = (da); \
ISC_LINK_INIT((event), ev_link); \
+ ISC_LINK_INIT((event), ev_ratelink); \
} while (0)
/*%
ev->ev_sender = task;
*eventp = NULL;
if (rl->pushpop)
- ISC_LIST_PREPEND(rl->pending, ev, ev_link);
+ ISC_LIST_PREPEND(rl->pending, ev, ev_ratelink);
else
- ISC_LIST_APPEND(rl->pending, ev, ev_link);
+ ISC_LIST_APPEND(rl->pending, ev, ev_ratelink);
} else if (rl->state == isc_ratelimiter_idle) {
result = isc_timer_reset(rl->timer, isc_timertype_ticker, NULL,
&rl->interval, ISC_FALSE);
REQUIRE(event != NULL);
LOCK(&rl->lock);
- if (ISC_LINK_LINKED(event, ev_link)) {
- ISC_LIST_UNLINK(rl->pending, event, ev_link);
+ if (ISC_LINK_LINKED(event, ev_ratelink)) {
+ ISC_LIST_UNLINK(rl->pending, event, ev_ratelink);
event->ev_sender = NULL;
} else
result = ISC_R_NOTFOUND;
/*
* There is work to do. Let's do it after unlocking.
*/
- ISC_LIST_UNLINK(rl->pending, p, ev_link);
+ ISC_LIST_UNLINK(rl->pending, p, ev_ratelink);
} else {
/*
* No work left to do. Stop the timer so that we don't
(void)isc_timer_reset(rl->timer, isc_timertype_inactive,
NULL, NULL, ISC_FALSE);
while ((ev = ISC_LIST_HEAD(rl->pending)) != NULL) {
- ISC_LIST_UNLINK(rl->pending, ev, ev_link);
+ ISC_LIST_UNLINK(rl->pending, ev, ev_ratelink);
ev->ev_attributes |= ISC_EVENTATTR_CANCELED;
task = ev->ev_sender;
isc_task_send(task, &ev);