Alan Stern wrote:

However, I think it won't hurt to have an unprotected asynchronous change that sets the state to NOTATTACHED. If the value should get overwritten because of a race, all that will happen is that some URBs will be sent to the HCD instead of rejected immediately. But the device structure will still get removed in the end.

Or maybe just have a spinlock to prevent micro-races, like something clobbering (authoritative) NOTATTACHED with some now-obsolete state.

Having a semaphore protecting something that changes asynchronously
just doesn't make much sense.  It does make sense to have a semaphore
protect things that only change in a controlled way -- like switching
between configurations or altsettings.

- Dave




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to