Lines Matching defs:io
618 static void zonemgr_cancelio(dns_io_t *io);
11215 dns_io_t *io;
11221 io = isc_mem_get(zmgr->mctx, sizeof(*io));
11222 if (io == NULL)
11224 io->event = isc_event_allocate(zmgr->mctx, task, DNS_EVENT_IOREADY,
11225 action, arg, sizeof(*io->event));
11226 if (io->event == NULL) {
11227 isc_mem_put(zmgr->mctx, io, sizeof(*io));
11230 io->zmgr = zmgr;
11231 io->high = high;
11232 io->task = NULL;
11233 isc_task_attach(task, &io->task);
11234 ISC_LINK_INIT(io, link);
11235 io->magic = IO_MAGIC;
11241 if (io->high)
11242 ISC_LIST_APPEND(zmgr->high, io, link);
11244 ISC_LIST_APPEND(zmgr->low, io, link);
11247 *iop = io;
11250 isc_task_send(io->task, &io->event);
11257 dns_io_t *io;
11262 io = *iop;
11263 REQUIRE(DNS_IO_VALID(io));
11267 INSIST(!ISC_LINK_LINKED(io, link));
11268 INSIST(io->event == NULL);
11270 zmgr = io->zmgr;
11271 isc_task_detach(&io->task);
11272 io->magic = 0;
11273 isc_mem_put(zmgr->mctx, io, sizeof(*io));
11294 zonemgr_cancelio(dns_io_t *io) {
11297 REQUIRE(DNS_IO_VALID(io));
11302 LOCK(&io->zmgr->iolock);
11303 if (ISC_LINK_LINKED(io, link)) {
11304 if (io->high)
11305 ISC_LIST_UNLINK(io->zmgr->high, io, link);
11307 ISC_LIST_UNLINK(io->zmgr->low, io, link);
11310 INSIST(io->event != NULL);
11312 UNLOCK(&io->zmgr->iolock);
11314 io->event->ev_attributes |= ISC_EVENTATTR_CANCELED;
11315 isc_task_send(io->task, &io->event);