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

Function linker_file_unregister_sysctls

freebsd/kern/kern_linker.c:339–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339static void
340linker_file_unregister_sysctls(linker_file_t lf)
341{
342 struct sysctl_oid **start, **stop, **oidp;
343
344 KLD_DPF(FILE, ("linker_file_unregister_sysctls: unregistering SYSCTLs"
345 " for %s\n", lf->filename));
346
347 sx_assert(&kld_sx, SA_XLOCKED);
348
349 if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0)
350 return;
351
352 sx_xunlock(&kld_sx);
353 sysctl_wlock();
354 for (oidp = start; oidp < stop; oidp++)
355 sysctl_unregister_oid(*oidp);
356 sysctl_wunlock();
357 sx_xlock(&kld_sx);
358}
359
360static int
361linker_file_register_modules(linker_file_t lf)

Callers 1

linker_file_unloadFunction · 0.85

Calls 4

linker_file_lookup_setFunction · 0.85
sysctl_wlockFunction · 0.85
sysctl_unregister_oidFunction · 0.85
sysctl_wunlockFunction · 0.85

Tested by

no test coverage detected