Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2007 00:55:17 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        "Rick Mullis" <probsd@gmail.com>, freebsd-usb@freebsd.org
Subject:   Re: USB
Message-ID:  <200703120055.17764.hselasky@c2i.net>
In-Reply-To: <483316d70703111636x16c0ed15v6f77ea6aa60f8d87@mail.gmail.com>
References:  <483316d70703111636x16c0ed15v6f77ea6aa60f8d87@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 12 March 2007 00:36, Rick Mullis wrote:
> /usr/src/sys/sys/systm.h

They defined msleep() like this:

+#define	msleep(chan, mtx, pri, wmesg, timo)				\
+	_sleep((chan), &(mtx)->mtx_object, (pri), (wmesg), (timo))

Arg.

Well, I think the new _sleep() has the same problem like the old one. It 
doesn't take Giant as a sleeping mutex argument.

Try definition msleep() like this in /sys/dev/usb/usb_port.h:

#undef msleep
#define msleep(i,m,p,w,t) _sleep(i,(((m) == &Giant) ? NULL : 
&(m)->mtx_object),p,w,t)

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703120055.17764.hselasky>