PERFORCE change 83044 for review
John Baldwin
jhb at FreeBSD.org
Fri Sep 2 20:33:45 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=83044
Change 83044 by jhb at jhb_slimer on 2005/09/02 20:33:00
Add a static mutex and also ensure that we enter the debugger after
both initializing and destroying the locks.
Affected files ...
.. //depot/projects/smpng/sys/modules/sx_sysinit/sx_sysinit.c#2 edit
Differences ...
==== //depot/projects/smpng/sys/modules/sx_sysinit/sx_sysinit.c#2 (text+ko) ====
@@ -34,18 +34,32 @@
*/
#include <sys/param.h>
+#include <sys/kdb.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/module.h>
+#include <sys/mutex.h>
#include <sys/sx.h>
-struct sx foo;
+static struct sx foo;
+static struct mtx bar;
+
SX_SYSINIT(foo_sx, &foo, "foo sx");
+MTX_SYSINIT(bar_mtx, &bar, "bar mtx", MTX_DEF);
+
+static void
+mod_unload(void *dummy)
+{
+
+ kdb_enter("unload");
+}
+SYSUNINIT(mod_unload, SI_SUB_CONSOLE, SI_ORDER_FIRST, mod_unload, NULL);
static int
load(void *arg)
{
+ kdb_enter("load");
return (0);
}
More information about the p4-projects
mailing list