USB

Hans Petter Selasky hselasky at c2i.net
Sun Mar 11 23:55:42 UTC 2007


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


More information about the freebsd-usb mailing list