VirtualBox

Changeset 90332 in vbox


Ignore:
Timestamp:
Jul 26, 2021 12:57:23 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145895
Message:

Dev*: Use PDMCritSect API via PDMDevHlp. bugref:10074

Location:
trunk/src/VBox/Devices
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r89588 r90332  
    35643564{
    35653565    PE1KSTATE pThis = (PE1KSTATE)pvUser;
    3566     Assert(PDMCritSectIsOwner(&pThis->csTx));
     3566    Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->csTx));
    35673567    RT_NOREF(hTimer);
    35683568
  • trunk/src/VBox/Devices/PC/DevIoApic.cpp

    r90318 r90332  
    15301530     * Destroy the RTE critical section.
    15311531     */
    1532     if (PDMCritSectIsInitialized(&pThis->CritSect))
    1533         PDMR3CritSectDelete(&pThis->CritSect);
     1532    if (PDMDevHlpCritSectIsInitialized(pDevIns, &pThis->CritSect))
     1533        PDMDevHlpCritSectDelete(pDevIns, &pThis->CritSect);
    15341534# else
    15351535    RT_NOREF_PV(pThis);
  • trunk/src/VBox/Devices/Parallel/DevParallel.cpp

    r82968 r90332  
    304304    PPARALLELPORT   pThis   = PDMDEVINS_2_DATA(pDevIns, PPARALLELPORT);
    305305
    306     PDMCritSectEnter(pDevIns->pCritSectRoR3, VINF_SUCCESS);
     306    PDMDevHlpCritSectEnter(pDevIns, pDevIns->pCritSectRoR3, VINF_SUCCESS);
    307307    parallelR3IrqSet(pDevIns, pThis);
    308     PDMCritSectLeave(pDevIns->pCritSectRoR3);
     308    PDMDevHlpCritSectLeave(pDevIns, pDevIns->pCritSectRoR3);
    309309
    310310    return VINF_SUCCESS;
  • trunk/src/VBox/Devices/Serial/UartCore.cpp

    r88536 r90332  
    16321632
    16331633    /* Set the transmitter empty bit because everything was sent. */
    1634     PDMCritSectEnter(&pThis->CritSect, VERR_IGNORED);
     1634    PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED);
    16351635    UART_REG_SET(pThis->uRegLsr, UART_REG_LSR_TEMT);
    16361636    uartIrqUpdate(pDevIns, pThis, pThisCC);
    1637     PDMCritSectLeave(&pThis->CritSect);
     1637    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    16381638    return VINF_SUCCESS;
    16391639}
     
    16521652    AssertReturn(cbRead > 0, VERR_INVALID_PARAMETER);
    16531653
    1654     PDMCritSectEnter(&pThis->CritSect, VERR_IGNORED);
     1654    PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED);
    16551655    uartR3TxQueueCopyFrom(pDevIns, pThis, pThisCC, pvBuf, cbRead, pcbRead);
    1656     PDMCritSectLeave(&pThis->CritSect);
     1656    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    16571657
    16581658    LogFlowFunc(("-> VINF_SUCCESS{*pcbRead=%zu}\n", *pcbRead));
     
    16711671    PPDMDEVINS  pDevIns = pThisCC->pDevIns;
    16721672
    1673     PDMCritSectEnter(&pThis->CritSect, VERR_IGNORED);
     1673    PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED);
    16741674    uartR3StsLinesUpdate(pDevIns, pThis, pThisCC, fNewStatusLines);
    1675     PDMCritSectLeave(&pThis->CritSect);
     1675    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    16761676    return VINF_SUCCESS;
    16771677}
     
    16881688    PPDMDEVINS  pDevIns = pThisCC->pDevIns;
    16891689
    1690     PDMCritSectEnter(&pThis->CritSect, VERR_IGNORED);
     1690    PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED);
    16911691    UART_REG_SET(pThis->uRegLsr, UART_REG_LSR_BI);
    16921692    uartIrqUpdate(pDevIns, pThis, pThisCC);
    1693     PDMCritSectLeave(&pThis->CritSect);
     1693    PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
    16941694    return VINF_SUCCESS;
    16951695}
  • trunk/src/VBox/Devices/USB/DevOHCI.cpp

    r87971 r90332  
    60246024    if (RTCritSectIsInitialized(&pThisCC->CritSect))
    60256025        RTCritSectDelete(&pThisCC->CritSect);
    6026     PDMR3CritSectDelete(&pThis->CsIrq);
     6026    PDMDevHlpCritSectDelete(pDevIns, &pThis->CsIrq);
    60276027
    60286028    /*
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r90266 r90332  
    316316{
    317317    Log3(("vmmdevNotifyGuestWorker: fAddEvents=%#010x.\n", fAddEvents));
    318     Assert(PDMCritSectIsOwner(&pThis->CritSect));
     318    Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect));
    319319
    320320    if (!VMMDEV_INTERFACE_VERSION_IS_1_03(pThis))
     
    31833183                else
    31843184                {
    3185                     Log(("vmmdevFastRequestHandler: PDMCritSectEnter -> %Rrc\n", rc2));
     3185                    Log(("vmmdevFastRequestHandler: PDMDevHlpPDMCritSectEnter -> %Rrc\n", rc2));
    31863186                    rcStrict = rc2;
    31873187                }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette