2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

convert sender, arg, action, etc. to ev_sender, ev_arg, ev_action, etc.

This commit is contained in:
Michael Graff
2000-04-17 19:22:44 +00:00
parent 0d89e0d55c
commit e44487bfc2
46 changed files with 426 additions and 418 deletions

View File

@@ -250,9 +250,9 @@ task_shutdown(isc_task_t *task) {
for (event = TAIL(task->on_shutdown);
event != NULL;
event = prev) {
prev = PREV(event, link);
DEQUEUE(task->on_shutdown, event, link);
ENQUEUE(task->events, event, link);
prev = PREV(event, ev_link);
DEQUEUE(task->on_shutdown, event, ev_link);
ENQUEUE(task->events, event, ev_link);
}
}
@@ -342,8 +342,8 @@ task_send(isc_task_t *task, isc_event_t **eventp) {
REQUIRE(eventp != NULL);
event = *eventp;
REQUIRE(event != NULL);
REQUIRE(event->sender != NULL);
REQUIRE(event->type > 0);
REQUIRE(event->ev_sender != NULL);
REQUIRE(event->ev_type > 0);
REQUIRE(task->state != task_state_done);
XTRACE("task_send");
@@ -355,7 +355,7 @@ task_send(isc_task_t *task, isc_event_t **eventp) {
}
INSIST(task->state == task_state_ready ||
task->state == task_state_running);
ENQUEUE(task->events, event, link);
ENQUEUE(task->events, event, ev_link);
*eventp = NULL;
return (was_idle);
@@ -436,7 +436,7 @@ isc_task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp) {
*taskp = NULL;
}
#define PURGE_OK(event) (((event)->attributes & ISC_EVENTATTR_NOPURGE) == 0)
#define PURGE_OK(event) (((event)->ev_attributes & ISC_EVENTATTR_NOPURGE) == 0)
static unsigned int
dequeue_events(isc_task_t *task, void *sender, isc_eventtype_t first,
@@ -462,13 +462,13 @@ dequeue_events(isc_task_t *task, void *sender, isc_eventtype_t first,
LOCK(&task->lock);
for (event = HEAD(task->events); event != NULL; event = next_event) {
next_event = NEXT(event, link);
if (event->type >= first && event->type <= last &&
(sender == NULL || event->sender == sender) &&
(tag == NULL || event->tag == tag) &&
next_event = NEXT(event, ev_link);
if (event->ev_type >= first && event->ev_type <= last &&
(sender == NULL || event->ev_sender == sender) &&
(tag == NULL || event->ev_tag == tag) &&
(!purging || PURGE_OK(event))) {
DEQUEUE(task->events, event, link);
ENQUEUE(*events, event, link);
DEQUEUE(task->events, event, ev_link);
ENQUEUE(*events, event, ev_link);
count++;
}
}
@@ -498,7 +498,7 @@ isc_task_purgerange(isc_task_t *task, void *sender, isc_eventtype_t first,
ISC_TRUE);
for (event = HEAD(events); event != NULL; event = next_event) {
next_event = NEXT(event, link);
next_event = NEXT(event, ev_link);
isc_event_free(&event);
}
@@ -548,9 +548,9 @@ isc_task_purgeevent(isc_task_t *task, isc_event_t *event) {
for (curr_event = HEAD(task->events);
curr_event != NULL;
curr_event = next_event) {
next_event = NEXT(curr_event, link);
next_event = NEXT(curr_event, ev_link);
if (curr_event == event && PURGE_OK(event)) {
DEQUEUE(task->events, curr_event, link);
DEQUEUE(task->events, curr_event, ev_link);
break;
}
}
@@ -621,7 +621,7 @@ isc_task_onshutdown(isc_task_t *task, isc_taskaction_t action, void *arg) {
disallowed = ISC_TRUE;
result = ISC_R_SHUTTINGDOWN;
} else
ENQUEUE(task->on_shutdown, event, link);
ENQUEUE(task->on_shutdown, event, ev_link);
UNLOCK(&task->lock);
if (disallowed)
@@ -790,15 +790,15 @@ run(void *uap) {
do {
if (!EMPTY(task->events)) {
event = HEAD(task->events);
DEQUEUE(task->events, event, link);
DEQUEUE(task->events, event, ev_link);
/*
* Execute the event action.
*/
XTRACE("execute action");
if (event->action != NULL) {
if (event->ev_action != NULL) {
UNLOCK(&task->lock);
(event->action)(task, event);
(event->ev_action)(task,event);
LOCK(&task->lock);
}
dispatch_count++;