PERFORCE change 94170 for review
John Baldwin
jhb at FreeBSD.org
Tue Mar 28 15:17:41 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94170
Change 94170 by jhb at 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! */
}
More information about the p4-projects
mailing list