- Timestamp:
- Feb 9, 2014 4:05:37 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92127
- Location:
- trunk/src/VBox/Additions/common/VBoxGuest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r49950 r50372 1373 1373 { 1374 1374 uint32_t fMatches = VBoxGuestCommonGetAndCleanPendingEventsLocked(pDevExt, pSession, fReqEvents); 1375 if (fMatches )1375 if (fMatches || pSession->fPendingCancelWaitEvents) 1376 1376 { 1377 1377 RTSpinlockReleaseNoInts(pDevExt->EventSpinlock); … … 1383 1383 else 1384 1384 Log(("VBoxGuestCommonIOCtl: WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent)); 1385 pSession->fPendingCancelWaitEvents = false; 1385 1386 return VINF_SUCCESS; 1386 1387 } … … 1519 1520 PVBOXGUESTWAIT pSafe; 1520 1521 int rc = 0; 1522 /* Was as least one WAITEVENT in process for this session? If not we 1523 * set a flag that the next call should be interrupted immediately. This 1524 * is needed so that a user thread can reliably interrupt another one in a 1525 * WAITEVENT loop. */ 1526 bool fCancelledOne = false; 1521 1527 1522 1528 Log(("VBoxGuestCommonIOCtl: CANCEL_ALL_WAITEVENTS\n")); … … 1530 1536 if (pWait->pSession == pSession) 1531 1537 { 1538 fCancelledOne = true; 1532 1539 pWait->fResEvents = UINT32_MAX; 1533 1540 RTListNodeRemove(&pWait->ListNode); … … 1540 1547 } 1541 1548 } 1549 if (!fCancelledOne) 1550 pSession->fPendingCancelWaitEvents = true; 1542 1551 RTSpinlockReleaseNoInts(pDevExt->EventSpinlock); 1543 1552 Assert(rc == 0); -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
r45779 r50372 237 237 /* Guest Caps Acquired & Reported by this session */ 238 238 uint32_t u32AquiredGuestCaps; 239 /** Whether a CANCEL_ALL_WAITEVENTS is pending. This happens when 240 * CANCEL_ALL_WAITEVENTS is called, but no call to WAITEVENT is in process 241 * in the current session. In that case the next call will be interrupted 242 * at once. */ 243 bool volatile fPendingCancelWaitEvents; 239 244 } VBOXGUESTSESSION; 240 245
Note:
See TracChangeset
for help on using the changeset viewer.