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

Function iconv_mod_unload

freebsd/libkern/iconv.c:84–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82static void iconv_unregister_cspair(struct iconv_cspair *csp);
83
84static int
85iconv_mod_unload(void)
86{
87 struct iconv_cspair *csp;
88
89 sx_xlock(&iconv_lock);
90 TAILQ_FOREACH(csp, &iconv_cslist, cp_link) {
91 if (csp->cp_refcount) {
92 sx_xunlock(&iconv_lock);
93 return EBUSY;
94 }
95 }
96
97 while ((csp = TAILQ_FIRST(&iconv_cslist)) != NULL)
98 iconv_unregister_cspair(csp);
99 sx_xunlock(&iconv_lock);
100 sx_destroy(&iconv_lock);
101 return 0;
102}
103
104static int
105iconv_mod_handler(module_t mod, int type, void *data)

Callers 1

iconv_mod_handlerFunction · 0.85

Calls 2

iconv_unregister_cspairFunction · 0.85
sx_destroyFunction · 0.50

Tested by

no test coverage detected