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

Function carp_modevent

freebsd/netinet/ip_carp.c:2286–2308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2284}
2285
2286static int
2287carp_modevent(module_t mod, int type, void *data)
2288{
2289 switch (type) {
2290 case MOD_LOAD:
2291 return carp_mod_load();
2292 /* NOTREACHED */
2293 case MOD_UNLOAD:
2294 mtx_lock(&carp_mtx);
2295 if (LIST_EMPTY(&carp_list))
2296 carp_mod_cleanup();
2297 else {
2298 mtx_unlock(&carp_mtx);
2299 return (EBUSY);
2300 }
2301 break;
2302
2303 default:
2304 return (EINVAL);
2305 }
2306
2307 return (0);
2308}
2309
2310static moduledata_t carp_mod = {
2311 "carp",

Callers

nothing calls this directly

Calls 4

carp_mod_loadFunction · 0.85
carp_mod_cleanupFunction · 0.85
mtx_lockFunction · 0.50
mtx_unlockFunction · 0.50

Tested by

no test coverage detected