Lines Matching refs:kld_sx

106 static struct sx kld_sx;	/* kernel linker lock */  variable
125 sx_assert(&kld_sx, SA_XLOCKED); \
160 sx_init(&kld_sx, "kernel linker"); in linker_init()
202 sx_assert(&kld_sx, SA_XLOCKED); in linker_file_sysinit()
230 sx_xunlock(&kld_sx); in linker_file_sysinit()
245 sx_xlock(&kld_sx); in linker_file_sysinit()
257 sx_assert(&kld_sx, SA_XLOCKED); in linker_file_sysuninit()
286 sx_xunlock(&kld_sx); in linker_file_sysuninit()
302 sx_xlock(&kld_sx); in linker_file_sysuninit()
314 sx_assert(&kld_sx, SA_XLOCKED); in linker_file_register_sysctls()
319 sx_xunlock(&kld_sx); in linker_file_register_sysctls()
328 sx_xlock(&kld_sx); in linker_file_register_sysctls()
360 sx_assert(&kld_sx, SA_XLOCKED); in linker_file_enable_sysctls()
365 sx_xunlock(&kld_sx); in linker_file_enable_sysctls()
370 sx_xlock(&kld_sx); in linker_file_enable_sysctls()
381 sx_assert(&kld_sx, SA_XLOCKED); in linker_file_unregister_sysctls()
386 sx_xunlock(&kld_sx); in linker_file_unregister_sysctls()
391 sx_xlock(&kld_sx); in linker_file_unregister_sysctls()
404 sx_assert(&kld_sx, SA_XLOCKED); in linker_file_register_modules()
440 sx_xlock(&kld_sx); in linker_init_kernel_modules()
442 sx_xunlock(&kld_sx); in linker_init_kernel_modules()
459 sx_assert(&kld_sx, SA_XLOCKED); in linker_load_file()
558 sx_xlock(&kld_sx); in linker_reference_module()
562 sx_xunlock(&kld_sx); in linker_reference_module()
567 sx_xunlock(&kld_sx); in linker_reference_module()
578 sx_xlock(&kld_sx); in linker_release_module()
584 sx_xunlock(&kld_sx); in linker_release_module()
592 sx_xunlock(&kld_sx); in linker_release_module()
605 sx_assert(&kld_sx, SA_XLOCKED); in linker_find_file_by_name()
621 sx_assert(&kld_sx, SA_XLOCKED); in linker_find_file_by_id()
634 sx_xlock(&kld_sx); in linker_file_foreach()
640 sx_xunlock(&kld_sx); in linker_file_foreach()
651 sx_assert(&kld_sx, SA_XLOCKED); in linker_make_file()
694 sx_assert(&kld_sx, SA_XLOCKED); in linker_file_unload()
845 sx_assert(&kld_sx, SA_XLOCKED); in linker_file_add_dependency()
866 sx_assert(&kld_sx, SA_LOCKED); in linker_file_lookup_set()
886 locked = sx_xlocked(&kld_sx); in linker_file_lookup_symbol()
888 sx_xlock(&kld_sx); in linker_file_lookup_symbol()
891 sx_xunlock(&kld_sx); in linker_file_lookup_symbol()
905 sx_assert(&kld_sx, SA_XLOCKED); in linker_file_lookup_symbol_internal()
1124 if (!sx_try_slock(&kld_sx)) in linker_search_symbol_name_flags()
1127 sx_slock(&kld_sx); in linker_search_symbol_name_flags()
1130 sx_sunlock(&kld_sx); in linker_search_symbol_name_flags()
1151 sx_assert(&kld_sx, SA_XLOCKED); in linker_kldload_busy()
1154 sx_xlock(&kld_sx); in linker_kldload_busy()
1158 error = sx_sleep(&kld_busy, &kld_sx, in linker_kldload_busy()
1163 sx_xunlock(&kld_sx); in linker_kldload_busy()
1170 sx_xunlock(&kld_sx); in linker_kldload_busy()
1179 sx_assert(&kld_sx, SA_XLOCKED); in linker_kldload_unbusy()
1182 sx_xlock(&kld_sx); in linker_kldload_unbusy()
1192 sx_xunlock(&kld_sx); in linker_kldload_unbusy()
1226 sx_xunlock(&kld_sx); in kern_kldload()
1281 sx_xunlock(&kld_sx); in kern_kldunload()
1350 sx_xlock(&kld_sx); in sys_kldfind()
1356 sx_xunlock(&kld_sx); in sys_kldfind()
1374 sx_xlock(&kld_sx); in sys_kldnext()
1395 sx_xunlock(&kld_sx); in sys_kldnext()
1436 sx_xlock(&kld_sx); in kern_kldstat()
1439 sx_xunlock(&kld_sx); in kern_kldstat()
1457 sx_xunlock(&kld_sx); in kern_kldstat()
1493 sx_xlock(&kld_sx); in sys_kldfirstmod()
1505 sx_xunlock(&kld_sx); in sys_kldfirstmod()
1533 sx_xlock(&kld_sx); in sys_kldsym()
1559 sx_xunlock(&kld_sx); in sys_kldsym()
1668 sx_xlock(&kld_sx); in linker_preload()
1845 sx_xunlock(&kld_sx); in linker_preload()
1855 sx_xlock(&kld_sx); in linker_mountroot()
1859 sx_xunlock(&kld_sx); in linker_mountroot()
1871 sx_xlock(&kld_sx); in linker_preload_finish()
1890 sx_xunlock(&kld_sx); in linker_preload_finish()
2199 sx_slock(&kld_sx); in linker_hwpmc_list_objects()
2213 sx_sunlock(&kld_sx); in linker_hwpmc_list_objects()
2255 sx_assert(&kld_sx, SA_XLOCKED); in linker_load_module()
2328 sx_assert(&kld_sx, SA_XLOCKED); in linker_load_dependencies()
2416 sx_xlock(&kld_sx); in sysctl_kern_function_list()
2421 sx_xunlock(&kld_sx); in sysctl_kern_function_list()
2425 sx_xunlock(&kld_sx); in sysctl_kern_function_list()