Changeset 51566 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Jun 6, 2014 11:32:36 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r51516 r51566 276 276 AHCITXSTATE_32BIT_HACK = 0x7fffffff 277 277 } AHCITXSTATE, *PAHCITXSTATE; 278 AssertCompileSize(AHCITXSTATE, sizeof(uint32_t)); 278 279 279 280 /** Task encountered a buffer overflow. */ … … 5659 5660 if (VALID_PTR(pAhciReq)) 5660 5661 { 5661 bool fXchg = false; 5662 ASMAtomicCmpXchgSize(&pAhciReq->enmTxState, AHCITXSTATE_CANCELED, AHCITXSTATE_ACTIVE, fXchg); 5662 bool fXchg = ASMAtomicCmpXchgU32((volatile uint32_t *)&pAhciReq->enmTxState, AHCITXSTATE_CANCELED, AHCITXSTATE_ACTIVE); 5663 5663 5664 5664 if (fXchg) … … 5909 5909 pAhciPort, pAhciReq, rcReq, fFreeReq)); 5910 5910 5911 ASMAtomicReadSize(&pAhciReq->enmTxState, &enmTxState);5911 enmTxState = (AHCITXSTATE)ASMAtomicReadU32((volatile uint32_t *)&pAhciReq->enmTxState); 5912 5912 VBOXDD_AHCI_REQ_COMPLETED(pAhciReq, rcReq, enmTxState, pAhciReq->uOffset, pAhciReq->cbTransfer); 5913 5913 VBOXDD_AHCI_REQ_COMPLETED_TIMESTAMP(pAhciReq, tsNow); … … 5943 5943 } 5944 5944 5945 ASMAtomicCmpXchgSize(&pAhciReq->enmTxState, AHCITXSTATE_FREE, AHCITXSTATE_ACTIVE, fXchg);5945 fXchg = ASMAtomicCmpXchgU32((volatile uint32_t *)&pAhciReq->enmTxState, AHCITXSTATE_FREE, AHCITXSTATE_ACTIVE); 5946 5946 5947 5947 if ( fXchg … … 6066 6066 6067 6067 fCanceled = true; 6068 ASMAtomicXchg Size(&pAhciReq->enmTxState, AHCITXSTATE_FREE);6068 ASMAtomicXchgU32((volatile uint32_t *)&pAhciReq->enmTxState, AHCITXSTATE_FREE); 6069 6069 6070 6070 if (pAhciReq->enmTxDir == AHCITXDIR_TRIM) … … 6609 6609 pAhciReq = pAhciPort->aCachedTasks[idx]; 6610 6610 6611 bool fXchg; 6612 ASMAtomicCmpXchgSize(&pAhciReq->enmTxState, AHCITXSTATE_ACTIVE, AHCITXSTATE_FREE, fXchg); 6611 bool fXchg = ASMAtomicCmpXchgU32((volatile uint32_t *)&pAhciReq->enmTxState, AHCITXSTATE_ACTIVE, AHCITXSTATE_FREE); 6613 6612 AssertMsg(fXchg, ("Task is already active\n")); 6614 6613 … … 6633 6632 * the guest messed up everything and this behavior is undefined. 6634 6633 */ 6635 ASMAtomicCmpXchgSize(&pAhciReq->enmTxState, AHCITXSTATE_FREE, AHCITXSTATE_ACTIVE, fXchg);6634 fXchg = ASMAtomicCmpXchgU32((volatile uint32_t *)&pAhciReq->enmTxState, AHCITXSTATE_FREE, AHCITXSTATE_ACTIVE); 6636 6635 Assert(fXchg); 6637 6636 u32Tasks &= ~RT_BIT_32(idx); /* Clear task bit. */ … … 6661 6660 AssertMsgFailed(("%s: Update the control register\n", __FUNCTION__)); 6662 6661 6663 ASMAtomicCmpXchgSize(&pAhciReq->enmTxState, AHCITXSTATE_FREE, AHCITXSTATE_ACTIVE, fXchg);6662 fXchg = ASMAtomicCmpXchgU32((volatile uint32_t *)&pAhciReq->enmTxState, AHCITXSTATE_FREE, AHCITXSTATE_ACTIVE); 6664 6663 AssertMsg(fXchg, ("Task is not active\n")); 6665 6664 break;
Note:
See TracChangeset
for help on using the changeset viewer.