Changeset 81877 in vbox for trunk/src/VBox
- Timestamp:
- Nov 15, 2019 3:09:00 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r81875 r81877 891 891 Log(("P%u: %s: Setting interrupt\n", iPort, __FUNCTION__)); 892 892 893 int rc = PDM CritSectEnter(&pAhci->lock, rcBusy);893 int rc = PDMDevHlpCritSectEnter(pAhci->CTX_SUFF(pDevIns), &pAhci->lock, rcBusy); 894 894 if (rc != VINF_SUCCESS) 895 895 return rc; … … 930 930 } 931 931 932 PDM CritSectLeave(&pAhci->lock);932 PDMDevHlpCritSectLeave(pAhci->CTX_SUFF(pDevIns), &pAhci->lock); 933 933 return VINF_SUCCESS; 934 934 } … … 1612 1612 Log(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value)); 1613 1613 1614 int rc = PDM CritSectEnter(&pAhci->lock, VINF_IOM_R3_MMIO_WRITE);1614 int rc = PDMDevHlpCritSectEnter(pAhci->CTX_SUFF(pDevIns), &pAhci->lock, VINF_IOM_R3_MMIO_WRITE); 1615 1615 if (rc != VINF_SUCCESS) 1616 1616 return rc; … … 1664 1664 } 1665 1665 1666 PDM CritSectLeave(&pAhci->lock);1666 PDMDevHlpCritSectLeave(pAhci->CTX_SUFF(pDevIns), &pAhci->lock); 1667 1667 return VINF_SUCCESS; 1668 1668 } … … 1675 1675 RT_NOREF1(iReg); 1676 1676 1677 int rc = PDM CritSectEnter(&pAhci->lock, VINF_IOM_R3_MMIO_READ);1677 int rc = PDMDevHlpCritSectEnter(pAhci->CTX_SUFF(pDevIns), &pAhci->lock, VINF_IOM_R3_MMIO_READ); 1678 1678 if (rc != VINF_SUCCESS) 1679 1679 return rc; … … 1681 1681 uint32_t u32PortsInterrupted = ASMAtomicXchgU32(&pAhci->u32PortsInterrupted, 0); 1682 1682 1683 PDM CritSectLeave(&pAhci->lock);1683 PDMDevHlpCritSectLeave(pAhci->CTX_SUFF(pDevIns), &pAhci->lock); 1684 1684 Log(("%s: read regHbaIs=%#010x u32PortsInterrupted=%#010x\n", __FUNCTION__, pAhci->regHbaIs, u32PortsInterrupted)); 1685 1685 … … 4553 4553 } 4554 4554 4555 /* The async IO thread for one port. */ 4555 /** 4556 * @callback_method_impl{FNPDMTHREADDEV, The async IO thread for one port.} 4557 */ 4556 4558 static DECLCALLBACK(int) ahciAsyncIOLoop(PPDMDEVINS pDevIns, PPDMTHREAD pThread) 4557 4559 { … … 4690 4692 4691 4693 /** 4692 * Unblock the async I/O thread so it can respond to a state change. 4693 * 4694 * @returns VBox status code. 4695 * @param pDevIns The device instance. 4696 * @param pThread The send thread. 4694 * @callback_method_impl{FNPDMTHREADWAKEUPDEV} 4697 4695 */ 4698 4696 static DECLCALLBACK(int) ahciAsyncIOLoopWakeUp(PPDMDEVINS pDevIns, PPDMTHREAD pThread) … … 5556 5554 int rcThread; 5557 5555 /* Destroy the thread. */ 5558 rc = PDM R3ThreadDestroy(pAhciPort->pAsyncIOThread, &rcThread);5556 rc = PDMDevHlpThreadDestroy(pDevIns, pAhciPort->pAsyncIOThread, &rcThread); 5559 5557 if (RT_FAILURE(rc) || RT_FAILURE(rcThread)) 5560 5558 AssertMsgFailed(("%s Failed to destroy async IO thread rc=%Rrc rcThread=%Rrc\n", __FUNCTION__, rc, rcThread)); … … 5764 5762 static DECLCALLBACK(int) ahciR3Destruct(PPDMDEVINS pDevIns) 5765 5763 { 5764 PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns); 5766 5765 PAHCI pThis = PDMDEVINS_2_DATA(pDevIns, PAHCI); 5767 5766 int rc = VINF_SUCCESS; 5768 PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);5769 5767 5770 5768 /* … … 5773 5771 * will take care of terminating and cleaning up the thread. 5774 5772 */ 5775 if (PDM CritSectIsInitialized(&pThis->lock))5773 if (PDMDevHlpCritSectIsInitialized(pDevIns, &pThis->lock)) 5776 5774 { 5777 5775 TMR3TimerDestroy(pThis->CTX_SUFF(pHbaCccTimer)); … … 5793 5791 } 5794 5792 5795 PDM R3CritSectDelete(&pThis->lock);5793 PDMDevHlpCritSectDelete(pDevIns, &pThis->lock); 5796 5794 } 5797 5795 … … 5804 5802 static DECLCALLBACK(int) ahciR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg) 5805 5803 { 5804 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns); 5806 5805 PAHCI pThis = PDMDEVINS_2_DATA(pDevIns, PAHCI); 5807 5806 PCPDMDEVHLPR3 pHlp = pDevIns->pHlpR3; … … 5810 5809 unsigned i = 0; 5811 5810 uint32_t cbTotalBufferSize = 0; 5812 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);5813 5811 5814 5812 LogFlowFunc(("pThis=%#p\n", pThis));
Note:
See TracChangeset
for help on using the changeset viewer.