On Tue, 9 Dec 2003, Oliver Neukum wrote: > > > It would still be a good idea to give drivers an easy way to wait for an > > URB to be completely idle (i.e., completion handler not running and URB > > not currently linked) without making them do careful locking and > > Absolutely. That's what people want when they do a synchronous unlink. > > > synchronization themselves. To do so would require the core to be able to > > tell, after the completion handler returns, whether the URB has been > > resubmitted. Currently I don't think there is any way to do this. > > It is doable with a flag. Set it in usb_submit_urb() and reset > it in usb_urb_giveback_urb(). As we have established usb_urb_giveback_urb() > cannot be reentered, so I see no race in checking that flag after the > completion handler. > > The code have already proposed should in essence be up to it.
In fact, that's essentially what my usage_count was doing, except that you're saying the counter can be reduced to a single bit. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
