* Mike Mestnik <[EMAIL PROTECTED]> wrote:

> > as Alan mentioned it before, the BKL did not protect much, since the DRM
> > code was freely doing copying from and to userspace, and hence dropping
> > the BKL at those places.
> > 
> Add sleeping(usleep) to this list, no?  The big Q I have is why are
> IOCTL's protected by the BKL if it gets droped so easily?

usleep is for short delays, it uses busy-looping. msleep is the one that
schedules away.

> > but yes, best would be to drop the BKL as soon as possible and check
> > everything.
> > 
> By check everything, you mean make sure shared resources(memory) are used
> safely?

yes. This means some sort of locking has to be added (if it's not
present already). The easiest solution would be to add a semaphore
(mutex) to each device and use that to serialize multiple users and API
calls. A mutex doesnt get dropped when you schedule away.

        Ingo


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to