| 1748 | } |
| 1749 | |
| 1750 | static void |
| 1751 | selfdfree(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. */ |
| 1768 | void |
no test coverage detected