PERFORCE change 67607 for review

John Baldwin jhb at FreeBSD.org
Thu Dec 23 12:38:37 PST 2004


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

Change 67607 by jhb at jhb_slimer on 2004/12/23 20:38:31

	Add an assertion.

Affected files ...

.. //depot/projects/smpng/sys/sys/mutex.h#46 edit

Differences ...

==== //depot/projects/smpng/sys/sys/mutex.h#46 (text+ko) ====

@@ -182,8 +182,10 @@
 	critical_enter();						\
 	if ((mp)->mtx_lock == (uintptr_t)_tid)				\
 		(mp)->mtx_recurse++;					\
-	else								\
+	else {								\
+		KASSERT((mp)->mtx_lock == MTX_UNOWNED, ("corrupt spinlock")); \
 		(mp)->mtx_lock = (uintptr_t)_tid;			\
+	}								\
 } while (0)
 #endif /* SMP */
 #endif


More information about the p4-projects mailing list