VirtualBox

Changeset 44510 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Feb 1, 2013 1:24:40 PM (12 years ago)
Author:
vboxsync
Message:

PDM takes the RTC cirtical section before calling the PDMRTCREG callbacks. Documented DMA and IOAPIC locking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r44508 r44510  
    19841984    int rc;
    19851985    if (pVM->pdm.s.pRtc)
    1986         rc = pVM->pdm.s.pRtc->Reg.pfnWrite(pVM->pdm.s.pRtc->pDevIns, iReg, u8Value);
     1986    {
     1987        PPDMDEVINS pDevInsRtc = pVM->pdm.s.pRtc->pDevIns;
     1988        rc = PDMCritSectEnter(pDevInsRtc->pCritSectRoR3, VERR_IGNORED);
     1989        if (RT_SUCCESS(rc))
     1990        {
     1991            rc = pVM->pdm.s.pRtc->Reg.pfnWrite(pDevInsRtc, iReg, u8Value);
     1992            PDMCritSectLeave(pDevInsRtc->pCritSectRoR3);
     1993        }
     1994    }
    19871995    else
    19881996        rc = VERR_PDM_NO_RTC_INSTANCE;
     
    20052013    int rc;
    20062014    if (pVM->pdm.s.pRtc)
    2007         rc = pVM->pdm.s.pRtc->Reg.pfnRead(pVM->pdm.s.pRtc->pDevIns, iReg, pu8Value);
     2015    {
     2016        PPDMDEVINS pDevInsRtc = pVM->pdm.s.pRtc->pDevIns;
     2017        rc = PDMCritSectEnter(pDevInsRtc->pCritSectRoR3, VERR_IGNORED);
     2018        if (RT_SUCCESS(rc))
     2019        {
     2020            rc = pVM->pdm.s.pRtc->Reg.pfnRead(pDevInsRtc, iReg, pu8Value);
     2021            PDMCritSectLeave(pDevInsRtc->pCritSectRoR3);
     2022        }
     2023    }
    20082024    else
    20092025        rc = VERR_PDM_NO_RTC_INSTANCE;
Note: See TracChangeset for help on using the changeset viewer.

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