Date: Fri, 27 Apr 2007 00:05:21 -0700 From: John-Mark Gurney <gurney_j@resnet.uoregon.edu> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org, Bosko Milekic <bosko.milekic@gmail.com> Subject: Re: msleep() on recursivly locked mutexes Message-ID: <20070427070521.GH73385@funkthat.com> In-Reply-To: <200704270750.04606.hselasky@c2i.net> References: <200704262136.33196.hselasky@c2i.net> <bbebbd3d0704261452h751048aeu6557b9b1abd8f32b@mail.gmail.com> <200704270750.04606.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hans Petter Selasky wrote this message on Fri, Apr 27, 2007 at 07:50 +0200: > On Thursday 26 April 2007 23:52, Bosko Milekic wrote: > > On 4/26/07, Hans Petter Selasky <hselasky@c2i.net> wrote: > > > Hi, > > > > > > In the new USB stack I have defined the following: > > > > Could you perhaps describe some of the codepaths in the USB stack that > > require this behavior? > > There are no requirements for that. It is just for the convenience of unwary > USB device driver developers. The reason we have restrictions on such things as prevention of recursion on mutexes is for the convenience of the unwary developer so they don't do something stupid, and not realize it till it's causing bugs... Multithreaded programming is hard, and even w/ the power of witness, is still hard to get right, and we need to help capable programmers not make mistakes... There is always ugen if the driver developer doesn't want to deal w/ making their driver multithread safe... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070427070521.GH73385>