2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

event purging api change

This commit is contained in:
Bob Halley
1999-06-15 23:18:44 +00:00
parent 07697f1c52
commit d717d5600b
2 changed files with 8 additions and 6 deletions

View File

@@ -200,7 +200,8 @@ destroy(isc_timer_t *timer) {
isc_task_purgerange(timer->task, isc_task_purgerange(timer->task,
timer, timer,
ISC_TASKEVENT_FIRSTEVENT, ISC_TASKEVENT_FIRSTEVENT,
ISC_TASKEVENT_LASTEVENT); ISC_TASKEVENT_LASTEVENT,
0);
deschedule(timer); deschedule(timer);
UNLINK(manager->timers, timer, link); UNLINK(manager->timers, timer, link);
@@ -356,7 +357,8 @@ isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
isc_task_purgerange(timer->task, isc_task_purgerange(timer->task,
timer, timer,
ISC_TASKEVENT_FIRSTEVENT, ISC_TASKEVENT_FIRSTEVENT,
ISC_TASKEVENT_LASTEVENT); ISC_TASKEVENT_LASTEVENT,
0);
timer->type = type; timer->type = type;
timer->expires = *expires; timer->expires = *expires;
timer->interval = *interval; timer->interval = *interval;

View File

@@ -418,7 +418,7 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
* Initialize readable event * Initialize readable event
*/ */
ISC_EVENT_INIT(&sock->readable_ev, sizeof(intev_t), ISC_EVENT_INIT(&sock->readable_ev, sizeof(intev_t),
ISC_EVENTATTR_NOPURGE, ISC_SOCKEVENT_INTR, ISC_EVENTATTR_NOPURGE, 0, ISC_SOCKEVENT_INTR,
NULL, sock, sock, NULL, NULL); NULL, sock, sock, NULL, NULL);
sock->magic = SOCKET_MAGIC; sock->magic = SOCKET_MAGIC;
@@ -2527,7 +2527,7 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task,
ISC_LIST_DEQUEUE(sock->recv_list, iev, link); ISC_LIST_DEQUEUE(sock->recv_list, iev, link);
if (iev->posted) { if (iev->posted) {
if (isc_task_purge(current_task, sock, if (isc_task_purge(current_task, sock,
ISC_SOCKEVENT_INTRECV) ISC_SOCKEVENT_INTRECV, 0)
== 0) { == 0) {
iev->canceled = ISC_TRUE; iev->canceled = ISC_TRUE;
iev->done_ev = NULL; iev->done_ev = NULL;
@@ -2578,7 +2578,7 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task,
ISC_LIST_DEQUEUE(sock->send_list, iev, link); ISC_LIST_DEQUEUE(sock->send_list, iev, link);
if (iev->posted) { if (iev->posted) {
if (isc_task_purge(current_task, sock, if (isc_task_purge(current_task, sock,
ISC_SOCKEVENT_INTSEND) ISC_SOCKEVENT_INTSEND, 0)
== 0) { == 0) {
iev->canceled = ISC_TRUE; iev->canceled = ISC_TRUE;
iev->done_ev = NULL; iev->done_ev = NULL;
@@ -2654,7 +2654,7 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task,
sock->connect_ev = NULL; sock->connect_ev = NULL;
if (iev->posted) { if (iev->posted) {
if (isc_task_purge(current_task, sock, if (isc_task_purge(current_task, sock,
ISC_SOCKEVENT_INTCONN) ISC_SOCKEVENT_INTCONN, 0)
== 0) { == 0) {
iev->canceled = ISC_TRUE; iev->canceled = ISC_TRUE;
iev->done_ev = NULL; iev->done_ev = NULL;