Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Dec 2005 22:03:02 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 87906 for review
Message-ID:  <200512082203.jB8M32qV022049@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=87906

Change 87906 by jhb@jhb_slimer on 2005/12/08 22:02:02

	Add an event for testing show mtx and show sx.

Affected files ...

.. //depot/projects/smpng/sys/modules/crash/crash.c#22 edit

Differences ...

==== //depot/projects/smpng/sys/modules/crash/crash.c#22 (text+ko) ====

@@ -83,6 +83,23 @@
 
 /* Events. */
 
+static void
+ddblock_test(void)
+{
+
+	mtx_lock(&test1_mtx);
+	kdb_enter("test1_mtx locked");
+	mtx_unlock(&test1_mtx);
+	sx_slock(&foo);
+	kdb_enter("foo slocked");
+	sx_sunlock(&foo);
+	sx_xlock(&foo);
+	kdb_enter("foo xlocked");
+	sx_xunlock(&foo);
+	kdb_enter("both unlocked");
+}
+CRASH_EVENT("ddb lock commands", ddblock_test);
+
 #ifdef WITNESS
 static void
 spinlock_test(void)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512082203.jB8M32qV022049>