Greetings,

On 07-Apr-01 David Brownell wrote:
>> I was browsing through the USB Programming Guide at usb.cs.tum.edu, and I
>> was wondering about one thing... I came across usb_control_msg(), and I
>> recall reading on linux-usb-devel@ that it is not safe to call this
>> function
>> from interrupt context (e.g. probe() and handler functions), because it
>> may
>> sleep (but I could be wrong).
> 
> This is mentioned in the kernel doc ... "make htmldocs" at the
> top level of the source tree.  But probe() is a fine place to use
> such synchronous function.

Uhm, the question was not whether or not it is dangerous to sleep() in
interrupt context; I know it is. Rather, the question was if
usb_control_msg() is safe to call because it might sleep() eventually. I
guess that has been answered now.

> In general I'd be interested in seeing more of that info be part
> of the standard kernel tree.  Not that the "kerneldoc" is as
> thorough as I'd like (compare to javadoc :) but everyone has
> access, and it's more natural to maintain.

Well, I think an API with documentation like the USB system has, is rare...
Most programming info from the Linux kernel is rather obfuscated. But yes,
each function should then mention from which context it can be called (user,
hardirq, bh, etc).

 - Nemosoft

-----------------------------------------------------------------------------
Try SorceryNet!   One of the best IRC-networks around!   irc.sorcery.net:9000
URL: never        IRC: nemosoft      IscaBBS (bbs.isca.uiowa.edu): Nemosoft
                        >> Never mind the daylight << 

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to