Am Mittwoch, 31. Januar 2007 14:18 schrieb Jiri Kosina: > > > with both the flags unset (if a timeout doesn't happen sooner, which is > > > OK). If this "final" wake_up() is called before the usbhid_wait_io() is > > > called, this is also OK, because then the condition will evaluate to true > > > and the task won't event sleep on the waitqueue. > > Who tells you that the flags will still be cleared? Somebody else may > > have called usbhid_submit_report() by the time you check the flags. > > Yes, but in such case it is again guaranteed that there will be wake_up() > coming from the URB submission which happened later - either the flags are > cleared, or wake_up() will eventually happen (you are right that it might > possibly be wake_up() corresponding to submission of URB submitted later, > but does that matter?).
Yes, as you cannot make sure it'll come before the timeout strikes, nor can you make sure the condition will be true when a second URB finishes. This logic can fail under load. Regards Oliver ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel