Date: Tue, 28 Mar 2006 15:17:40 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94170 for review Message-ID: <200603281517.k2SFHe92033253@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94170 Change 94170 by jhb@jhb_twclab on 2006/03/28 15:17:18 Don't do locking until we've stopped adding linker classes and fix the assertion to take that into account. Affected files ... .. //depot/projects/smpng/sys/kern/kern_linker.c#47 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_linker.c#47 (text+ko) ==== @@ -63,7 +63,7 @@ #define KLD_LOCK() do { sx_xlock(&kld_sx); mtx_lock(&Giant); } while (0) #define KLD_UNLOCK() do { mtx_unlock(&Giant); sx_xunlock(&kld_sx); } while (0) -#define KLD_LOCK_ASSERT() sx_assert(&kld_sx, SX_XLOCKED) +#define KLD_LOCK_ASSERT() do { if (linker_no_more_classes) sx_assert(&kld_sx, SX_XLOCKED); } while (0) /* * static char *linker_search_path(const char *name, struct mod_depend @@ -1222,7 +1222,6 @@ modlist_t mod; struct sysinit **si_start, **si_stop; - KLD_LOCK(); TAILQ_INIT(&loaded_files); TAILQ_INIT(&depended_files); TAILQ_INIT(&found_modules); @@ -1399,7 +1398,6 @@ linker_file_register_sysctls(lf); lf->flags |= LINKER_FILE_LINKED; } - KLD_UNLOCK(); /* woohoo! we made it! */ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603281517.k2SFHe92033253>