> > Why not simply use wait_event_interruptible()?

Good idea. Unfortunately, we lack wait_event_timeout().

> I'm not too familiar with the USB code, so I'm not sure if such a change
> is possible in all cases. It may help if I give an example of what I was
> referring to:
> 
> drivers/usb/misc/auerswald.c::auerchain_start_wait_urb()
> 
> as it is right now:
> 
> set_current_state (TASK_INTERRUPTIBLE);  /* I changed this */
> add_wait_queue (&chs.wqh, &wait);
> 
> ---some other stuff---
> 
> while (timeout && !chs.done)
> {
>       set_current_state(TASK_INTERRUPTIBLE); /* I change this & the
>                                                       order */

You must not. If you are using TASK_INTERRUPTIBLE, you must be prepared
to handle signal delivery, which you don't do and which would be very hard
to do correctly at this place.

        Regards
                Oliver


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to