> > On the other hand, there are a lot of usb-drivers with tons of races in
> > the conditional schedule patch. I'm going to write a comment on this
> > tomorrow. The basic message is there is a window between testing
> > urb->status==-EINPROGRESS and going to sleep during which a wake_up()
> > from the completion-handler (interrupt-context!) is simply lost.
> > That's why using sleep_on() and friends is now deprecated!
> > Instead one should use set_current_state() and schedule() in combination
> > with a private waitqueue - look into drivers/usb/audio.c for example.
> >
> > Martin
>
> Wouldn't it work if I clear the interrupt flag using cli() before testing
> the urb->status? sleep_on() and interruptible_sleep_on() set the flag again
> when they start waiting. So interrupts should not get lost. Or is it a
> mistake?
This in principle works. However it will stop working in 2.5.
Besides it causes terrible performance on SMP. Don't do this.
Regards
Oliver
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel