Date: Tue, 1 Jul 2008 08:50:45 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 144412 for review Message-ID: <200807010850.m618ojt1059196@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=144412 Change 144412 by hselasky@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);home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807010850.m618ojt1059196>
