MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kqueue_destroy

Function kqueue_destroy

freebsd/kern/kern_event.c:2146–2162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2144}
2145
2146static void
2147kqueue_destroy(struct kqueue *kq)
2148{
2149
2150 KASSERT(kq->kq_fdp == NULL,
2151 ("kqueue still attached to a file descriptor"));
2152 seldrain(&kq->kq_sel);
2153 knlist_destroy(&kq->kq_sel.si_note);
2154 mtx_destroy(&kq->kq_lock);
2155
2156 if (kq->kq_knhash != NULL)
2157 free(kq->kq_knhash, M_KQUEUE);
2158 if (kq->kq_knlist != NULL)
2159 free(kq->kq_knlist, M_KQUEUE);
2160
2161 funsetown(&kq->kq_sigio);
2162}
2163
2164/*ARGSUSED*/
2165static int

Callers 2

kern_kevent_anonymousFunction · 0.85
kqueue_closeFunction · 0.85

Calls 4

seldrainFunction · 0.85
knlist_destroyFunction · 0.85
funsetownFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected