PERFORCE change 83039 for review
John Baldwin
jhb at FreeBSD.org
Fri Sep 2 19:53:55 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=83039
Change 83039 by jhb at jhb_slimer on 2005/09/02 19:53:11
Add a test for calling try lock on a spin mutex.
Affected files ...
.. //depot/projects/smpng/sys/modules/crash/crash.c#18 edit
Differences ...
==== //depot/projects/smpng/sys/modules/crash/crash.c#18 (text+ko) ====
@@ -395,6 +395,18 @@
}
CRASH_EVENT("sleep while sleeping is prohibited", test_no_sleeping);
+static void
+test_trylock_spin(void)
+{
+
+ printf("Should panic\n");
+ if (mtx_trylock(&sched_lock))
+ printf("Hmm, locked!\n");
+ else
+ printf("Not locked\n");
+}
+CRASH_EVENT("try lock on a spin mutex", test_trylock_spin);
+
/* Help event should be last so that it is always event 1. */
static void
More information about the p4-projects
mailing list