Lines Matching defs:io
798 static void zonemgr_cancelio(dns_io_t *io);
16535 dns_io_t *io;
16541 io = isc_mem_get(zmgr->mctx, sizeof(*io));
16542 if (io == NULL)
16545 io->event = isc_event_allocate(zmgr->mctx, task, DNS_EVENT_IOREADY,
16546 action, arg, sizeof(*io->event));
16547 if (io->event == NULL) {
16548 isc_mem_put(zmgr->mctx, io, sizeof(*io));
16552 io->zmgr = zmgr;
16553 io->high = high;
16554 io->task = NULL;
16555 isc_task_attach(task, &io->task);
16556 ISC_LINK_INIT(io, link);
16557 io->magic = IO_MAGIC;
16563 if (io->high)
16564 ISC_LIST_APPEND(zmgr->high, io, link);
16566 ISC_LIST_APPEND(zmgr->low, io, link);
16569 *iop = io;
16572 isc_task_send(io->task, &io->event);
16578 dns_io_t *io;
16583 io = *iop;
16584 REQUIRE(DNS_IO_VALID(io));
16588 INSIST(!ISC_LINK_LINKED(io, link));
16589 INSIST(io->event == NULL);
16591 zmgr = io->zmgr;
16592 isc_task_detach(&io->task);
16593 io->magic = 0;
16594 isc_mem_put(zmgr->mctx, io, sizeof(*io));
16615 zonemgr_cancelio(dns_io_t *io) {
16618 REQUIRE(DNS_IO_VALID(io));
16623 LOCK(&io->zmgr->iolock);
16624 if (ISC_LINK_LINKED(io, link)) {
16625 if (io->high)
16626 ISC_LIST_UNLINK(io->zmgr->high, io, link);
16628 ISC_LIST_UNLINK(io->zmgr->low, io, link);
16631 INSIST(io->event != NULL);
16633 UNLOCK(&io->zmgr->iolock);
16635 io->event->ev_attributes |= ISC_EVENTATTR_CANCELED;
16636 isc_task_send(io->task, &io->event);