Explanation required for usb_kill_urb and usb_poision_urb functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I have some questions regarding below two methods in drivers/usr/core/urb.c source code.

Methods:
void usb_kill_urb(struct urb *urb)
void usb_poison_urb(struct urb *urb)

In both functions we have used `wait_event` method but haven't checked for the condition `atomic_read(&urb->use_count) == 0` before going to sleep. Should we add the check before putting the calling process to sleep or avoiding check is intended (please explain if yes).

Regards
Kumar Gaurav
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux