PERFORCE change 144412 for review

Hans Petter Selasky hselasky at FreeBSD.org
Tue Jul 1 08:50:46 UTC 2008


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

Change 144412 by hselasky at hselasky_laptop001 on 2008/07/01 08:50:14

	
	Revert my changes. It appears that the "how" argument
	is not always passed on from unlock to lock like
	expected. The problem will be solved in another way.

Affected files ...

.. //depot/projects/usb/src/sys/kern/kern_mutex.c#10 integrate

Differences ...

==== //depot/projects/usb/src/sys/kern/kern_mutex.c#10 (text+ko) ====

@@ -133,8 +133,7 @@
 void
 lock_mtx(struct lock_object *lock, int how)
 {
-	if (how == 1)
-		return;
+
 	mtx_lock((struct mtx *)lock);
 }
 
@@ -151,18 +150,6 @@
 	struct mtx *m;
 
 	m = (struct mtx *)lock;
-	if ((m == &Giant) && (!mtx_owned(m))) {
-		/* 
-		 * Sometimes DROP_GIANT() gets in our way when we use
-		 * the system condition variables passing the "Giant"
-		 * mutex. If Giant is not locked when we get into this
-		 * function then we can simply ignore those cases,
-		 * because the locking is then handled by the DROP_XXX
-		 * macros!
-		 */
-		return (1);
-	}
-
 	mtx_assert(m, MA_OWNED | MA_NOTRECURSED);
 	mtx_unlock(m);
 	return (0);


More information about the p4-projects mailing list