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

Function pf_unload

freebsd/netpfil/pf/pf_ioctl.c:4750–4770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4748}
4749
4750static void
4751pf_unload(void)
4752{
4753
4754 sx_xlock(&pf_end_lock);
4755 pf_end_threads = 1;
4756 while (pf_end_threads < 2) {
4757 wakeup_one(pf_purge_thread);
4758 sx_sleep(pf_purge_proc, &pf_end_lock, 0, "pftmo", 0);
4759 }
4760 sx_xunlock(&pf_end_lock);
4761
4762 if (pf_dev != NULL)
4763 destroy_dev(pf_dev);
4764
4765 pfi_cleanup();
4766
4767 rm_destroy(&pf_rules_lock);
4768 sx_destroy(&pf_ioctl_lock);
4769 sx_destroy(&pf_end_lock);
4770}
4771
4772static void
4773vnet_pf_init(void *unused __unused)

Callers

nothing calls this directly

Calls 5

destroy_devFunction · 0.85
pfi_cleanupFunction · 0.85
wakeup_oneFunction · 0.50
rm_destroyFunction · 0.50
sx_destroyFunction · 0.50

Tested by

no test coverage detected