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

Function unp_discard

freebsd/kern/uipc_usrreq.c:2476–2491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2474}
2475
2476static void
2477unp_discard(struct file *fp)
2478{
2479 struct unp_defer *dr;
2480
2481 if (unp_externalize_fp(fp)) {
2482 dr = malloc(sizeof(*dr), M_TEMP, M_WAITOK);
2483 dr->ud_fp = fp;
2484 UNP_DEFERRED_LOCK();
2485 SLIST_INSERT_HEAD(&unp_defers, dr, ud_link);
2486 UNP_DEFERRED_UNLOCK();
2487 atomic_add_int(&unp_defers_count, 1);
2488 taskqueue_enqueue(taskqueue_thread, &unp_defer_task);
2489 } else
2490 closef_nothread(fp);
2491}
2492
2493static void
2494unp_process_defers(void *arg __unused, int pending)

Callers 1

unp_freerightsFunction · 0.85

Calls 4

unp_externalize_fpFunction · 0.85
mallocFunction · 0.85
taskqueue_enqueueFunction · 0.85
closef_nothreadFunction · 0.85

Tested by

no test coverage detected