PERFORCE change 144415 for review

Hans Petter Selasky hselasky at freebsd.org
Thu Aug 7 16:08:02 UTC 2008


On Thursday 07 August 2008, John Baldwin wrote:
> On Tuesday 01 July 2008 07:03:59 am Hans Petter Selasky wrote:
> > http://perforce.freebsd.org/chv.cgi?CH=144415
> >
> > Change 144415 by hselasky at hselasky_laptop001 on 2008/07/01 11:03:31
> >
> >
> > 	To allow USB drivers using the Giant mutex, like ukbd
> > 	and the tty layer (ucom), condition variable functions
> > 	like mtx_sleep() and cv_wait() needs to support the Giant
> > 	mutex. Previously using the Giant mutex with these functions
> > 	resulted in a panic due to an unlock race between the
> > 	GIANT_DROP macro and the internal mutex unlock in the
> > 	condition variable function. This patch will try to
> > 	resolve that race.
>
> I'd rather that the sleep and condition variable code just explicitly
> handle this case rather than changing DROP_GIANT().
>

Hi,

I have implemented a set of wrappers for these functions that handle this.

See "src/sys/dev/usb2/core/usb2_util.h" in the USB P4 tree.

The files that were changed regarding this issue will not be integrated, 
though they currently remain in the P4 repository.

--HPS


More information about the p4-projects mailing list