Changeset 37135 in vbox
- Timestamp:
- May 18, 2011 2:44:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/win/USBProxyDevice-win.cpp
r37132 r37135 617 617 */ 618 618 PVUSBURB pUrb = NULL; 619 unsigned cQueuedUrbs = pPriv->cQueuedUrbs; 619 unsigned cQueuedUrbs; 620 /* we must get the queued urb count inside a lock 621 * otherwise we may end up in a situation when cQueuedUrbs is incremented 622 * by the usbProxyWinAsyncIoThread, but the pPriv->paHandles[cQueuedUrbs-1] 623 * is still invalid */ 624 RTCritSectEnter(&pPriv->CritSect); 625 cQueuedUrbs = pPriv->cQueuedUrbs; 626 RTCritSectLeave(&pPriv->CritSect); 627 620 628 DWORD rc = WaitForMultipleObjects(cQueuedUrbs, pPriv->paHandles, FALSE, cMillies); 621 629 if (rc >= WAIT_OBJECT_0 && rc < WAIT_OBJECT_0 + cQueuedUrbs)
Note:
See TracChangeset
for help on using the changeset viewer.