> I'm sure you can figure several of them out if you think about it for a
> few minutes.  (Hint:  if you have a spinlock that protects access to
> a pointer outside the completion handler, and that pointer is nulled
> when its data is freed, what else might you need to do??)

Using a spinlock is possible but hard.
a) you must unlink asynchronously
b) you must be very careful in the completion handler not to
take the lock if you are killed.
c) the HCD may need to defer the cancelation because
it cannot reliably prevent the hardware from executing the
transfer. In that case it needs to inform the completion handler
of the cancelation first, because the succesful completion may
free the urb.

        Regards
                Oliver

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

Reply via email to