Greg KH wrote:
On Wed, Jan 19, 2005 at 01:14:07AM +0100, Thomas Winischhofer wrote:
OK, this one better?
if((retval == 0) && timeout) {
if(sisusb->urbstatus[index] & SU_URB_BUSY) {
add_wait_queue(&sisusb->wait_q, &wait);
set_current_state(TASK_INTERRUPTIBLE);
while(1) {
if(timeout && (sisusb->urbstatus[index] & SU_URB_BUSY)) {
timeout = schedule_timeout(timeout);
} else {
set_current_state(TASK_RUNNING);
break;
}
}
remove_wait_queue(&sisusb->wait_q, &wait);
}
Doesn't one of the many wait_event* macros work out better for this?
Yes. Damn the SIGHUP. Now I wait uninterruptible. Unless anybody protests.
Thomas
--
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net *** http://www.winischhofer.net/
twini AT xfree86 DOT org
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel