On Sun, Nov 28, 2004 at 11:03:11PM +0100, Manfred Spraul wrote:

> Hi pavel,

My name is Vojtech. ;)

> CHECK_OWNERSHIP in drivers/usb/input/hid-tmff.c tests for 
> current->pid==0. The same code is used in several files (hid-lgff.c, 
> usb/input/pid.c, drivers/input/joystick/iforce/iforce.h)
> Do you know why? I don't understand the reason for the test.
> There are two cases where current->pid is 0: for the idle thread(s) and 
> historically for dead threads (not true anymore). current can't be dead 
> and I don't think that it makes sense to check if current is an idle thread.
 
I think it's to check whether there is a process associated with the
device, with 0 being a special value "no process".

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to