- Timestamp:
- Mar 6, 2019 4:27:47 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129205
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r77157 r77585 1443 1443 const GuestWaitEventPayload *pPayload) 1444 1444 { 1445 if ( ASMAtomicReadBool(&mfAborted))1445 if (mfAborted) 1446 1446 return VERR_CANCELLED; 1447 1447 … … 1481 1481 int rc = VINF_SUCCESS; 1482 1482 1483 if ( ASMAtomicReadBool(&mfAborted))1483 if (mfAborted) 1484 1484 rc = VERR_CANCELLED; 1485 1485 … … 1489 1489 1490 1490 rc = RTSemEventWait(mEventSem, msTimeout ? msTimeout : RT_INDEFINITE_WAIT); 1491 if (ASMAtomicReadBool(&mfAborted)) 1491 if ( RT_SUCCESS(rc) 1492 && mfAborted) 1493 { 1492 1494 rc = VERR_CANCELLED; 1495 } 1496 1493 1497 if (RT_SUCCESS(rc)) 1494 1498 { … … 1516 1520 int GuestWaitEvent::Cancel(void) 1517 1521 { 1518 AssertReturn(!mfAborted, VERR_CANCELLED); 1519 ASMAtomicWriteBool(&mfAborted, true); 1522 if (mfAborted) /* Already aborted? */ 1523 return VINF_SUCCESS; 1524 1525 mfAborted = true; 1520 1526 1521 1527 #ifdef DEBUG_andy
Note:
See TracChangeset
for help on using the changeset viewer.