PERFORCE change 88148 for review

John Baldwin jhb at FreeBSD.org
Tue Dec 13 13:56:28 PST 2005


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

Change 88148 by jhb at jhb_slimer on 2005/12/13 21:55:37

	Misc cleanups and one more test case.

Affected files ...

.. //depot/projects/smpng/sys/kern/kern_mutex.c#113 edit
.. //depot/projects/smpng/sys/kern/kern_sx.c#29 edit
.. //depot/projects/smpng/sys/modules/crash/crash.c#24 edit

Differences ...

==== //depot/projects/smpng/sys/kern/kern_mutex.c#113 (text+ko) ====

@@ -990,6 +990,7 @@
 		db_printf(", RECURSE");
 	if (m->mtx_object.lo_flags & LO_DUPOK)
 		db_printf(", DUPOK");
+	db_printf("}\n");
 	db_printf(" state: {");
 	if (mtx_unowned(m))
 		db_printf("UNOWNED");

==== //depot/projects/smpng/sys/kern/kern_sx.c#29 (text+ko) ====

@@ -393,12 +393,12 @@
 	db_printf(" state: ");
 	if (sx->sx_cnt < 0) {
 		td = sx->sx_xholder;
-		db_printf(" XLOCK: %p (tid %d, pid %d, \"%s\")\n", td,
+		db_printf("XLOCK: %p (tid %d, pid %d, \"%s\")\n", td,
 		    td->td_tid, td->td_proc->p_pid, td->td_proc->p_comm);
 	} else if (sx->sx_cnt > 0)
-		db_printf(" SLOCK: %d locks\n", sx->sx_cnt);
+		db_printf("SLOCK: %d locks\n", sx->sx_cnt);
 	else
-		db_printf(" UNLOCKED\n");
+		db_printf("UNLOCKED\n");
 	db_printf(" waiters: %d shared, %d exclusive\n", sx->sx_shrd_wcnt,
 	    sx->sx_excl_wcnt);
 }

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

@@ -89,6 +89,9 @@
 
 	mtx_lock(&test_mtx);
 	kdb_enter("test_mtx locked");
+	mtx_lock(&test_mtx);
+	kdb_enter("test_mtx recursed");
+	mtx_unlock(&test_mtx);
 	mtx_unlock(&test_mtx);
 	sx_slock(&foo);
 	kdb_enter("foo slocked");


More information about the p4-projects mailing list