On Tue, Jan 29, 2002 at 06:37:27PM +0100, Oliver Neukum wrote: > > Very well, so where is it legal to use these functions from two threads > of execution? There'd be a race between usb_put_urb() and usb_get_urb() > as usb_put_urb() might free the urb.
If you are calling usb_put_urb() and usb_get_urb() in two different threads, then yes, you are going to have a potential problem. But skbufs, kernel mount points, and loads of other kernel objects have this "potential" race problem (i.e. very tiny and unrealistic). > I see the overhead of atomic operations without gain obvious to me. It is needed if two people are calling usb_put_urb() at the same time. You only want one of them to actually do the free(). thanks, greg k-h _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
