usb_raw: acquire_sem with B_KILL_CAN_INTERRUPT.
This way, applications blocked in usb_raw can actually be killed, instead of "hanging" until the USB device is removed or the transfer finishes. Improves a number of USB tickets, but does not really "fix" any of the underlying problems that lead to this happening.
This commit is contained in:
parent
e20a08d1c2
commit
d7f7aadf98
@ -730,7 +730,10 @@ usb_raw_ioctl(void *cookie, uint32 op, void *buffer, size_t length)
|
||||
break;
|
||||
}
|
||||
|
||||
acquire_sem(device->notify);
|
||||
status = acquire_sem_etc(device->notify, 1, B_KILL_CAN_INTERRUPT, 0);
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
command.control.status = device->status;
|
||||
command.control.length = device->actual_length;
|
||||
deviceLocker.Unlock();
|
||||
@ -851,7 +854,10 @@ usb_raw_ioctl(void *cookie, uint32 op, void *buffer, size_t length)
|
||||
break;
|
||||
}
|
||||
|
||||
acquire_sem(device->notify);
|
||||
status = acquire_sem_etc(device->notify, 1, B_KILL_CAN_INTERRUPT, 0);
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
command.transfer.status = device->status;
|
||||
command.transfer.length = device->actual_length;
|
||||
deviceLocker.Unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user