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

Function selfdfree

freebsd/kern/sys_generic.c:1750–1765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1748}
1749
1750static void
1751selfdfree(struct seltd *stp, struct selfd *sfp)
1752{
1753 STAILQ_REMOVE(&stp->st_selq, sfp, selfd, sf_link);
1754 /*
1755 * Paired with doselwakeup.
1756 */
1757 if (atomic_load_acq_ptr((uintptr_t *)&sfp->sf_si) != (uintptr_t)NULL) {
1758 mtx_lock(sfp->sf_mtx);
1759 if (sfp->sf_si != NULL) {
1760 TAILQ_REMOVE(&sfp->sf_si->si_tdlist, sfp, sf_threads);
1761 }
1762 mtx_unlock(sfp->sf_mtx);
1763 }
1764 free(sfp, M_SELFD);
1765}
1766
1767/* Drain the waiters tied to all the selfd belonging the specified selinfo. */
1768void

Callers 3

selrescanFunction · 0.85
pollrescanFunction · 0.85
seltdclearFunction · 0.85

Calls 3

mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70
freeFunction · 0.70

Tested by

no test coverage detected