PERFORCE change 88893 for review

John Baldwin jhb at FreeBSD.org
Thu Dec 29 10:35:18 PST 2005


http://perforce.freebsd.org/chv.cgi?CH=88893

Change 88893 by jhb at jhb_slimer on 2005/12/29 18:34:03

	Actually lock the mutex, duh.

Affected files ...

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

Differences ...

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

@@ -97,6 +97,7 @@
 
 	bzero(&test1_mtx, sizeof(test1_mtx));
 	mtx_init(&test1_mtx, "test1", NULL, MTX_SPIN);
+	mtx_lock_spin(&test1_mtx);
 	error = msleep_spin(&test1_mtx, &test1_mtx, "spincr", 5);
 	printf("msleep_spin returned %d\n", error);
 	kdb_enter("timed out");
@@ -104,6 +105,7 @@
 	error = msleep_spin(&test1_mtx, &test1_mtx, "spincr2", 0);
 	printf("msleep_spin returned %d\n", error);
 	kdb_enter("awoke from spin");
+	mtx_unlock_spin(&test1_mtx);
 	mtx_destroy(&test1_mtx);
 }
 CRASH_EVENT("msleep_spin", msleep_spin_test);


More information about the p4-projects mailing list