VirtualBox

Changeset 80673 in vbox for trunk


Ignore:
Timestamp:
Sep 9, 2019 2:02:22 PM (5 years ago)
Author:
vboxsync
Message:

PDM/DevHlp: Need to wrap the crit sect methods so we can pass on pVM to the crit sect code later, as we won't be able to sore pointers in the internal critical section data anymore. bugref:9218

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmcritsect.h

    r80268 r80673  
    6565                                      const char *pszNameFmt, ...) RT_IPRT_FORMAT_ATTR(6, 7);
    6666VMMR3DECL(int)      PDMR3CritSectEnterEx(PPDMCRITSECT pCritSect, bool fCallRing3);
    67 VMMR3DECL(bool)     PDMR3CritSectYield(PPDMCRITSECT pCritSect);
     67VMMR3DECL(bool)     PDMR3CritSectYield(PVM pVM, PPDMCRITSECT pCritSect);
    6868VMMR3DECL(const char *) PDMR3CritSectName(PCPDMCRITSECT pCritSect);
    6969VMMR3DECL(int)      PDMR3CritSectDelete(PPDMCRITSECT pCritSect);
  • trunk/include/VBox/vmm/pdmdev.h

    r80641 r80673  
    35793579    /** @name Exported PDM Critical Section Functions
    35803580     * @{ */
    3581     DECLR3CALLBACKMEMBER(bool,     pfnCritSectYield,(PPDMCRITSECT pCritSect));
    3582     DECLR3CALLBACKMEMBER(int,      pfnCritSectEnter,(PPDMCRITSECT pCritSect, int rcBusy));
    3583     DECLR3CALLBACKMEMBER(int,      pfnCritSectEnterDebug,(PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL));
    3584     DECLR3CALLBACKMEMBER(int,      pfnCritSectTryEnter,(PPDMCRITSECT pCritSect));
    3585     DECLR3CALLBACKMEMBER(int,      pfnCritSectTryEnterDebug,(PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL));
    3586     DECLR3CALLBACKMEMBER(int,      pfnCritSectLeave,(PPDMCRITSECT pCritSect));
    3587     DECLR3CALLBACKMEMBER(bool,     pfnCritSectIsOwner,(PCPDMCRITSECT pCritSect));
    3588     DECLR3CALLBACKMEMBER(bool,     pfnCritSectIsInitialized,(PCPDMCRITSECT pCritSect));
    3589     DECLR3CALLBACKMEMBER(bool,     pfnCritSectHasWaiters,(PCPDMCRITSECT pCritSect));
    3590     DECLR3CALLBACKMEMBER(uint32_t, pfnCritSectGetRecursion,(PCPDMCRITSECT pCritSect));
     3581    DECLR3CALLBACKMEMBER(bool,     pfnCritSectYield,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect));
     3582    DECLR3CALLBACKMEMBER(int,      pfnCritSectEnter,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy));
     3583    DECLR3CALLBACKMEMBER(int,      pfnCritSectEnterDebug,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL));
     3584    DECLR3CALLBACKMEMBER(int,      pfnCritSectTryEnter,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect));
     3585    DECLR3CALLBACKMEMBER(int,      pfnCritSectTryEnterDebug,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL));
     3586    DECLR3CALLBACKMEMBER(int,      pfnCritSectLeave,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect));
     3587    DECLR3CALLBACKMEMBER(bool,     pfnCritSectIsOwner,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
     3588    DECLR3CALLBACKMEMBER(bool,     pfnCritSectIsInitialized,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
     3589    DECLR3CALLBACKMEMBER(bool,     pfnCritSectHasWaiters,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
     3590    DECLR3CALLBACKMEMBER(uint32_t, pfnCritSectGetRecursion,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
    35913591    /** @} */
    35923592
     
    45474547    /** @name Exported PDM Critical Section Functions
    45484548     * @{ */
    4549     DECLRCCALLBACKMEMBER(int,      pfnCritSectEnter,(PPDMCRITSECT pCritSect, int rcBusy));
    4550     DECLRCCALLBACKMEMBER(int,      pfnCritSectEnterDebug,(PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL));
    4551     DECLRCCALLBACKMEMBER(int,      pfnCritSectTryEnter,(PPDMCRITSECT pCritSect));
    4552     DECLRCCALLBACKMEMBER(int,      pfnCritSectTryEnterDebug,(PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL));
    4553     DECLRCCALLBACKMEMBER(int,      pfnCritSectLeave,(PPDMCRITSECT pCritSect));
    4554     DECLRCCALLBACKMEMBER(bool,     pfnCritSectIsOwner,(PCPDMCRITSECT pCritSect));
    4555     DECLRCCALLBACKMEMBER(bool,     pfnCritSectIsInitialized,(PCPDMCRITSECT pCritSect));
    4556     DECLRCCALLBACKMEMBER(bool,     pfnCritSectHasWaiters,(PCPDMCRITSECT pCritSect));
    4557     DECLRCCALLBACKMEMBER(uint32_t, pfnCritSectGetRecursion,(PCPDMCRITSECT pCritSect));
     4549    DECLRCCALLBACKMEMBER(int,      pfnCritSectEnter,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy));
     4550    DECLRCCALLBACKMEMBER(int,      pfnCritSectEnterDebug,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL));
     4551    DECLRCCALLBACKMEMBER(int,      pfnCritSectTryEnter,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect));
     4552    DECLRCCALLBACKMEMBER(int,      pfnCritSectTryEnterDebug,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL));
     4553    DECLRCCALLBACKMEMBER(int,      pfnCritSectLeave,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect));
     4554    DECLRCCALLBACKMEMBER(bool,     pfnCritSectIsOwner,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
     4555    DECLRCCALLBACKMEMBER(bool,     pfnCritSectIsInitialized,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
     4556    DECLRCCALLBACKMEMBER(bool,     pfnCritSectHasWaiters,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
     4557    DECLRCCALLBACKMEMBER(uint32_t, pfnCritSectGetRecursion,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
    45584558    /** @} */
    45594559
     
    49194919    /** @name Exported PDM Critical Section Functions
    49204920     * @{ */
    4921     DECLR0CALLBACKMEMBER(int,      pfnCritSectEnter,(PPDMCRITSECT pCritSect, int rcBusy));
    4922     DECLR0CALLBACKMEMBER(int,      pfnCritSectEnterDebug,(PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL));
    4923     DECLR0CALLBACKMEMBER(int,      pfnCritSectTryEnter,(PPDMCRITSECT pCritSect));
    4924     DECLR0CALLBACKMEMBER(int,      pfnCritSectTryEnterDebug,(PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL));
    4925     DECLR0CALLBACKMEMBER(int,      pfnCritSectLeave,(PPDMCRITSECT pCritSect));
    4926     DECLR0CALLBACKMEMBER(bool,     pfnCritSectIsOwner,(PCPDMCRITSECT pCritSect));
    4927     DECLR0CALLBACKMEMBER(bool,     pfnCritSectIsInitialized,(PCPDMCRITSECT pCritSect));
    4928     DECLR0CALLBACKMEMBER(bool,     pfnCritSectHasWaiters,(PCPDMCRITSECT pCritSect));
    4929     DECLR0CALLBACKMEMBER(uint32_t, pfnCritSectGetRecursion,(PCPDMCRITSECT pCritSect));
     4921    DECLR0CALLBACKMEMBER(int,      pfnCritSectEnter,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy));
     4922    DECLR0CALLBACKMEMBER(int,      pfnCritSectEnterDebug,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL));
     4923    DECLR0CALLBACKMEMBER(int,      pfnCritSectTryEnter,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect));
     4924    DECLR0CALLBACKMEMBER(int,      pfnCritSectTryEnterDebug,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL));
     4925    DECLR0CALLBACKMEMBER(int,      pfnCritSectLeave,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect));
     4926    DECLR0CALLBACKMEMBER(bool,     pfnCritSectIsOwner,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
     4927    DECLR0CALLBACKMEMBER(bool,     pfnCritSectIsInitialized,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
     4928    DECLR0CALLBACKMEMBER(bool,     pfnCritSectHasWaiters,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
     4929    DECLR0CALLBACKMEMBER(uint32_t, pfnCritSectGetRecursion,(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect));
    49304930    /** @} */
    49314931
     
    65096509DECLINLINE(int) PDMDevHlpCritSectEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy)
    65106510{
    6511     return pDevIns->CTX_SUFF(pHlp)->pfnCritSectEnter(pCritSect, rcBusy);
     6511    return pDevIns->CTX_SUFF(pHlp)->pfnCritSectEnter(pDevIns, pCritSect, rcBusy);
    65126512}
    65136513
     
    65186518DECLINLINE(int) PDMDevHlpCritSectEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    65196519{
    6520     return pDevIns->CTX_SUFF(pHlp)->pfnCritSectEnterDebug(pCritSect, rcBusy, uId, RT_SRC_POS_ARGS);
     6520    return pDevIns->CTX_SUFF(pHlp)->pfnCritSectEnterDebug(pDevIns, pCritSect, rcBusy, uId, RT_SRC_POS_ARGS);
    65216521}
    65226522
     
    65276527DECLINLINE(int)      PDMDevHlpCritSectTryEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
    65286528{
    6529     return pDevIns->CTX_SUFF(pHlp)->pfnCritSectTryEnter(pCritSect);
     6529    return pDevIns->CTX_SUFF(pHlp)->pfnCritSectTryEnter(pDevIns, pCritSect);
    65306530}
    65316531
     
    65366536DECLINLINE(int)      PDMDevHlpCritSectTryEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    65376537{
    6538     return pDevIns->CTX_SUFF(pHlp)->pfnCritSectTryEnterDebug(pCritSect, uId, RT_SRC_POS_ARGS);
     6538    return pDevIns->CTX_SUFF(pHlp)->pfnCritSectTryEnterDebug(pDevIns, pCritSect, uId, RT_SRC_POS_ARGS);
    65396539}
    65406540
     
    65456545DECLINLINE(int)      PDMDevHlpCritSectLeave(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
    65466546{
    6547     return pDevIns->CTX_SUFF(pHlp)->pfnCritSectLeave(pCritSect);
     6547    return pDevIns->CTX_SUFF(pHlp)->pfnCritSectLeave(pDevIns, pCritSect);
    65486548}
    65496549
     
    65546554DECLINLINE(bool)     PDMDevHlpCritSectIsOwner(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
    65556555{
    6556     return pDevIns->CTX_SUFF(pHlp)->pfnCritSectIsOwner(pCritSect);
     6556    return pDevIns->CTX_SUFF(pHlp)->pfnCritSectIsOwner(pDevIns, pCritSect);
    65576557}
    65586558
     
    65636563DECLINLINE(bool)     PDMDevHlpCritSectIsInitialized(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
    65646564{
    6565     return pDevIns->CTX_SUFF(pHlp)->pfnCritSectIsInitialized(pCritSect);
     6565    return pDevIns->CTX_SUFF(pHlp)->pfnCritSectIsInitialized(pDevIns, pCritSect);
    65666566}
    65676567
     
    65726572DECLINLINE(bool)     PDMDevHlpCritSectHasWaiters(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
    65736573{
    6574     return pDevIns->CTX_SUFF(pHlp)->pfnCritSectHasWaiters(pCritSect);
     6574    return pDevIns->CTX_SUFF(pHlp)->pfnCritSectHasWaiters(pDevIns, pCritSect);
    65756575}
    65766576
     
    65816581DECLINLINE(uint32_t) PDMDevHlpCritSectGetRecursion(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
    65826582{
    6583     return pDevIns->CTX_SUFF(pHlp)->pfnCritSectGetRecursion(pCritSect);
     6583    return pDevIns->CTX_SUFF(pHlp)->pfnCritSectGetRecursion(pDevIns, pCritSect);
    65846584}
    65856585
  • trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp

    r80641 r80673  
    658658}
    659659
     660
    660661/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectGetNop} */
    661662static DECLCALLBACK(PPDMCRITSECT) pdmR0DevHlp_CritSectGetNop(PPDMDEVINS pDevIns)
     
    668669    return pCritSect;
    669670}
     671
    670672
    671673/** @interface_method_impl{PDMDEVHLPR0,pfnSetDeviceCritSect} */
     
    699701}
    700702
     703
     704/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectEnter} */
     705static DECLCALLBACK(int)      pdmR0DevHlp_CritSectEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy)
     706{
     707    PDMDEV_ASSERT_DEVINS(pDevIns);
     708    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pGVM to the crit sect code.   */
     709    return PDMCritSectEnter(pCritSect, rcBusy);
     710}
     711
     712
     713/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectEnterDebug} */
     714static DECLCALLBACK(int)      pdmR0DevHlp_CritSectEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     715{
     716    PDMDEV_ASSERT_DEVINS(pDevIns);
     717    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pGVM to the crit sect code.   */
     718    return PDMCritSectEnterDebug(pCritSect, rcBusy, uId, RT_SRC_POS_ARGS);
     719}
     720
     721
     722/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectTryEnter} */
     723static DECLCALLBACK(int)      pdmR0DevHlp_CritSectTryEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
     724{
     725    PDMDEV_ASSERT_DEVINS(pDevIns);
     726    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pGVM to the crit sect code.   */
     727    return PDMCritSectTryEnter(pCritSect);
     728}
     729
     730
     731/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectTryEnterDebug} */
     732static DECLCALLBACK(int)      pdmR0DevHlp_CritSectTryEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     733{
     734    PDMDEV_ASSERT_DEVINS(pDevIns);
     735    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pGVM to the crit sect code.   */
     736    return PDMCritSectTryEnterDebug(pCritSect, uId, RT_SRC_POS_ARGS);
     737}
     738
     739
     740/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectLeave} */
     741static DECLCALLBACK(int)      pdmR0DevHlp_CritSectLeave(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
     742{
     743    PDMDEV_ASSERT_DEVINS(pDevIns);
     744    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pGVM to the crit sect code.   */
     745    return PDMCritSectLeave(pCritSect);
     746}
     747
     748
     749/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectIsOwner} */
     750static DECLCALLBACK(bool)     pdmR0DevHlp_CritSectIsOwner(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
     751{
     752    PDMDEV_ASSERT_DEVINS(pDevIns);
     753    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pGVM to the crit sect code.   */
     754    return PDMCritSectIsOwner(pCritSect);
     755}
     756
     757
     758/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectIsOwnerEx} */
     759static DECLCALLBACK(bool)     pdmR0DevHlp_CritSectIsOwnerEx(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect, PVMCPUCC pVCpu)
     760{
     761    PDMDEV_ASSERT_DEVINS(pDevIns);
     762    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pGVM to the crit sect code.   */
     763    return PDMCritSectIsOwnerEx(pCritSect, pVCpu);
     764}
     765
     766
     767/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectIsInitialized} */
     768static DECLCALLBACK(bool)     pdmR0DevHlp_CritSectIsInitialized(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
     769{
     770    PDMDEV_ASSERT_DEVINS(pDevIns);
     771    RT_NOREF(pDevIns);
     772    return PDMCritSectIsInitialized(pCritSect);
     773}
     774
     775
     776/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectHasWaiters} */
     777static DECLCALLBACK(bool)     pdmR0DevHlp_CritSectHasWaiters(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
     778{
     779    PDMDEV_ASSERT_DEVINS(pDevIns);
     780    RT_NOREF(pDevIns);
     781    return PDMCritSectHasWaiters(pCritSect);
     782}
     783
     784
     785/** @interface_method_impl{PDMDEVHLPR0,pfnCritSectGetRecursion} */
     786static DECLCALLBACK(uint32_t) pdmR0DevHlp_CritSectGetRecursion(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
     787{
     788    PDMDEV_ASSERT_DEVINS(pDevIns);
     789    RT_NOREF(pDevIns);
     790    return PDMCritSectGetRecursion(pCritSect);
     791}
     792
     793
    701794/** @interface_method_impl{PDMDEVHLPR0,pfnDBGFTraceBuf} */
    702795static DECLCALLBACK(RTTRACEBUF) pdmR0DevHlp_DBGFTraceBuf(PPDMDEVINS pDevIns)
     
    704797    PDMDEV_ASSERT_DEVINS(pDevIns);
    705798    RTTRACEBUF hTraceBuf = pDevIns->Internal.s.pGVM->hTraceBufR0;
    706     LogFlow(("pdmR3DevHlp_DBGFTraceBuf: caller='%p'/%d: returns %p\n", pDevIns, pDevIns->iInstance, hTraceBuf));
     799    LogFlow(("pdmR0DevHlp_DBGFTraceBuf: caller='%p'/%d: returns %p\n", pDevIns, pDevIns->iInstance, hTraceBuf));
    707800    return hTraceBuf;
    708801}
     
    756849    pdmR0DevHlp_CritSectGetNop,
    757850    pdmR0DevHlp_SetDeviceCritSect,
    758     PDMCritSectEnter,
    759     PDMCritSectEnterDebug,
    760     PDMCritSectTryEnter,
    761     PDMCritSectTryEnterDebug,
    762     PDMCritSectLeave,
    763     PDMCritSectIsOwner,
    764     PDMCritSectIsInitialized,
    765     PDMCritSectHasWaiters,
    766     PDMCritSectGetRecursion,
     851    pdmR0DevHlp_CritSectEnter,
     852    pdmR0DevHlp_CritSectEnterDebug,
     853    pdmR0DevHlp_CritSectTryEnter,
     854    pdmR0DevHlp_CritSectTryEnterDebug,
     855    pdmR0DevHlp_CritSectLeave,
     856    pdmR0DevHlp_CritSectIsOwner,
     857    pdmR0DevHlp_CritSectIsInitialized,
     858    pdmR0DevHlp_CritSectHasWaiters,
     859    pdmR0DevHlp_CritSectGetRecursion,
    767860    pdmR0DevHlp_DBGFTraceBuf,
    768861    NULL /*pfnReserved1*/,
  • trunk/src/VBox/VMM/VMMR3/PDMCritSect.cpp

    r80334 r80673  
    841841 * @retval  true if yielded.
    842842 * @retval  false if not yielded.
     843 * @param   pVM                 The cross context VM structure.
    843844 * @param   pCritSect           The critical section.
    844845 */
    845 VMMR3DECL(bool) PDMR3CritSectYield(PPDMCRITSECT pCritSect)
     846VMMR3DECL(bool) PDMR3CritSectYield(PVM pVM, PPDMCRITSECT pCritSect)
    846847{
    847848    AssertPtrReturn(pCritSect, false);
     
    849850    Assert(pCritSect->s.Core.NativeThreadOwner == RTThreadNativeSelf());
    850851    Assert(!(pCritSect->s.Core.fFlags & RTCRITSECT_FLAGS_NOP));
     852    RT_NOREF(pVM);
    851853
    852854    /* No recursion allowed here. */
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r80641 r80673  
    24882488    LogFlow(("pdmR3DevHlp_SetDeviceCritSect: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS));
    24892489    return VINF_SUCCESS;
     2490}
     2491
     2492
     2493/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectYield} */
     2494static DECLCALLBACK(bool)     pdmR3DevHlp_CritSectYield(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
     2495{
     2496    PDMDEV_ASSERT_DEVINS(pDevIns);
     2497    return PDMR3CritSectYield(pDevIns->Internal.s.pVMR3, pCritSect);
     2498}
     2499
     2500
     2501/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectEnter} */
     2502static DECLCALLBACK(int)      pdmR3DevHlp_CritSectEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy)
     2503{
     2504    PDMDEV_ASSERT_DEVINS(pDevIns);
     2505    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pVMR3 to the crit sect code.   */
     2506    return PDMCritSectEnter(pCritSect, rcBusy);
     2507}
     2508
     2509
     2510/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectEnterDebug} */
     2511static DECLCALLBACK(int)      pdmR3DevHlp_CritSectEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     2512{
     2513    PDMDEV_ASSERT_DEVINS(pDevIns);
     2514    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pVMR3 to the crit sect code.   */
     2515    return PDMCritSectEnterDebug(pCritSect, rcBusy, uId, RT_SRC_POS_ARGS);
     2516}
     2517
     2518
     2519/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectTryEnter} */
     2520static DECLCALLBACK(int)      pdmR3DevHlp_CritSectTryEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
     2521{
     2522    PDMDEV_ASSERT_DEVINS(pDevIns);
     2523    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pVMR3 to the crit sect code.   */
     2524    return PDMCritSectTryEnter(pCritSect);
     2525}
     2526
     2527
     2528/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectTryEnterDebug} */
     2529static DECLCALLBACK(int)      pdmR3DevHlp_CritSectTryEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     2530{
     2531    PDMDEV_ASSERT_DEVINS(pDevIns);
     2532    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pVMR3 to the crit sect code.   */
     2533    return PDMCritSectTryEnterDebug(pCritSect, uId, RT_SRC_POS_ARGS);
     2534}
     2535
     2536
     2537/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectLeave} */
     2538static DECLCALLBACK(int)      pdmR3DevHlp_CritSectLeave(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
     2539{
     2540    PDMDEV_ASSERT_DEVINS(pDevIns);
     2541    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pVMR3 to the crit sect code.   */
     2542    return PDMCritSectLeave(pCritSect);
     2543}
     2544
     2545
     2546/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectIsOwner} */
     2547static DECLCALLBACK(bool)     pdmR3DevHlp_CritSectIsOwner(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
     2548{
     2549    PDMDEV_ASSERT_DEVINS(pDevIns);
     2550    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pVMR3 to the crit sect code.   */
     2551    return PDMCritSectIsOwner(pCritSect);
     2552}
     2553
     2554
     2555/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectIsOwnerEx} */
     2556static DECLCALLBACK(bool)     pdmR3DevHlp_CritSectIsOwnerEx(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect, PVMCPUCC pVCpu)
     2557{
     2558    PDMDEV_ASSERT_DEVINS(pDevIns);
     2559    RT_NOREF(pDevIns); /** @todo pass pDevIns->Internal.s.pVMR3 to the crit sect code.   */
     2560    return PDMCritSectIsOwnerEx(pCritSect, pVCpu);
     2561}
     2562
     2563
     2564/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectIsInitialized} */
     2565static DECLCALLBACK(bool)     pdmR3DevHlp_CritSectIsInitialized(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
     2566{
     2567    PDMDEV_ASSERT_DEVINS(pDevIns);
     2568    RT_NOREF(pDevIns);
     2569    return PDMCritSectIsInitialized(pCritSect);
     2570}
     2571
     2572
     2573/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectHasWaiters} */
     2574static DECLCALLBACK(bool)     pdmR3DevHlp_CritSectHasWaiters(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
     2575{
     2576    PDMDEV_ASSERT_DEVINS(pDevIns);
     2577    RT_NOREF(pDevIns);
     2578    return PDMCritSectHasWaiters(pCritSect);
     2579}
     2580
     2581
     2582/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectGetRecursion} */
     2583static DECLCALLBACK(uint32_t) pdmR3DevHlp_CritSectGetRecursion(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
     2584{
     2585    PDMDEV_ASSERT_DEVINS(pDevIns);
     2586    RT_NOREF(pDevIns);
     2587    return PDMCritSectGetRecursion(pCritSect);
    24902588}
    24912589
     
    42484346    pdmR3DevHlp_CritSectGetNopRC,
    42494347    pdmR3DevHlp_SetDeviceCritSect,
    4250     PDMR3CritSectYield,
    4251     PDMCritSectEnter,
    4252     PDMCritSectEnterDebug,
    4253     PDMCritSectTryEnter,
    4254     PDMCritSectTryEnterDebug,
    4255     PDMCritSectLeave,
    4256     PDMCritSectIsOwner,
    4257     PDMCritSectIsInitialized,
    4258     PDMCritSectHasWaiters,
    4259     PDMCritSectGetRecursion,
     4348    pdmR3DevHlp_CritSectYield,
     4349    pdmR3DevHlp_CritSectEnter,
     4350    pdmR3DevHlp_CritSectEnterDebug,
     4351    pdmR3DevHlp_CritSectTryEnter,
     4352    pdmR3DevHlp_CritSectTryEnterDebug,
     4353    pdmR3DevHlp_CritSectLeave,
     4354    pdmR3DevHlp_CritSectIsOwner,
     4355    pdmR3DevHlp_CritSectIsInitialized,
     4356    pdmR3DevHlp_CritSectHasWaiters,
     4357    pdmR3DevHlp_CritSectGetRecursion,
    42604358    pdmR3DevHlp_ThreadCreate,
    42614359    pdmR3DevHlp_SetAsyncNotification,
     
    46874785    pdmR3DevHlp_CritSectGetNopRC,
    46884786    pdmR3DevHlp_SetDeviceCritSect,
    4689     PDMR3CritSectYield,
    4690     PDMCritSectEnter,
    4691     PDMCritSectEnterDebug,
    4692     PDMCritSectTryEnter,
    4693     PDMCritSectTryEnterDebug,
    4694     PDMCritSectLeave,
    4695     PDMCritSectIsOwner,
    4696     PDMCritSectIsInitialized,
    4697     PDMCritSectHasWaiters,
    4698     PDMCritSectGetRecursion,
     4787    pdmR3DevHlp_CritSectYield,
     4788    pdmR3DevHlp_CritSectEnter,
     4789    pdmR3DevHlp_CritSectEnterDebug,
     4790    pdmR3DevHlp_CritSectTryEnter,
     4791    pdmR3DevHlp_CritSectTryEnterDebug,
     4792    pdmR3DevHlp_CritSectLeave,
     4793    pdmR3DevHlp_CritSectIsOwner,
     4794    pdmR3DevHlp_CritSectIsInitialized,
     4795    pdmR3DevHlp_CritSectHasWaiters,
     4796    pdmR3DevHlp_CritSectGetRecursion,
    46994797    pdmR3DevHlp_ThreadCreate,
    47004798    pdmR3DevHlp_SetAsyncNotification,
  • trunk/src/VBox/VMM/VMMR3/PGMDbg.cpp

    r80333 r80673  
    10041004        if (!--cYieldCountDown)
    10051005        {
    1006             fFullWalk = PDMR3CritSectYield(&pVM->pgm.s.CritSectX);
     1006            fFullWalk = PDMR3CritSectYield(pVM, &pVM->pgm.s.CritSectX);
    10071007            cYieldCountDown = cYieldCountDownReload;
    10081008        }
  • trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp

    r80333 r80673  
    13721372                        && (iPage & 0x7ff) == 0x100
    13731373#endif
    1374                         && PDMR3CritSectYield(&pVM->pgm.s.CritSectX)
     1374                        && PDMR3CritSectYield(pVM, &pVM->pgm.s.CritSectX)
    13751375                        && pVM->pgm.s.idRamRangesGen != idRamRangesGen)
    13761376                    {
     
    15841584                    if (   uPass != SSM_PASS_FINAL
    15851585                        && (iPage & 0x7ff) == 0x100
    1586                         && PDMR3CritSectYield(&pVM->pgm.s.CritSectX)
     1586                        && PDMR3CritSectYield(pVM, &pVM->pgm.s.CritSectX)
    15871587                        && pVM->pgm.s.idRamRangesGen != idRamRangesGen)
    15881588                    {
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