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

Function linker_file_register_sysctls

freebsd/kern/kern_linker.c:291–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291static void
292linker_file_register_sysctls(linker_file_t lf, bool enable)
293{
294 struct sysctl_oid **start, **stop, **oidp;
295
296 KLD_DPF(FILE,
297 ("linker_file_register_sysctls: registering SYSCTLs for %s\n",
298 lf->filename));
299
300 sx_assert(&kld_sx, SA_XLOCKED);
301
302 if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0)
303 return;
304
305 sx_xunlock(&kld_sx);
306 sysctl_wlock();
307 for (oidp = start; oidp < stop; oidp++) {
308 if (enable)
309 sysctl_register_oid(*oidp);
310 else
311 sysctl_register_disabled_oid(*oidp);
312 }
313 sysctl_wunlock();
314 sx_xlock(&kld_sx);
315}
316
317static void
318linker_file_enable_sysctls(linker_file_t lf)

Callers 2

linker_load_fileFunction · 0.85
linker_preloadFunction · 0.85

Calls 5

linker_file_lookup_setFunction · 0.85
sysctl_wlockFunction · 0.85
sysctl_register_oidFunction · 0.85
sysctl_wunlockFunction · 0.85

Tested by

no test coverage detected