VirtualBox

Changeset 37357 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jun 7, 2011 5:10:10 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72125
Message:

PGM: relax some assertion added earlier today so they'll survive reset and guru mediations.

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

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

    r37282 r37357  
    903903    MMR3HeapFree(pv);
    904904}
     905
     906/**
     907 * @copydoc PDMUSBHLP::pfnTMTimerCreate
     908 */
     909DECLINLINE(int) PDMUsbHlpTMTimerCreate(PPDMUSBINS pUsbIns, TMCLOCK enmClock, PFNTMTIMERUSB pfnCallback, void *pvUser,
     910                                       uint32_t fFlags, const char *pszDesc, PPTMTIMERR3 ppTimer)
     911{
     912    return pUsbIns->pHlpR3->pfnTMTimerCreate(pUsbIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, ppTimer);
     913}
    905914#endif /* IN_RING3 */
    906915
  • trunk/include/VBox/vmm/vm.h

    r36768 r37357  
    628628#endif
    629629
     630/** @def VMCPU_ASSERT_EMT_OR_GURU
     631 * Asserts that the current thread IS the emulation thread (EMT) of the
     632 * specified virtual CPU.
     633 */
     634#if defined(IN_RC) || defined(IN_RING0)
     635# define VMCPU_ASSERT_EMT_OR_GURU(pVCpu)    Assert(   VMCPU_IS_EMT(pVCpu) \
     636                                                   || pVCpu->CTX_SUFF(pVM)->enmVMState == VMSTATE_GURU_MEDITATION \
     637                                                   || pVCpu->CTX_SUFF(pVM)->enmVMState == VMSTATE_GURU_MEDITATION_LS )
     638#else
     639# define VMCPU_ASSERT_EMT_OR_GURU(pVCpu) \
     640    AssertMsg(   VMCPU_IS_EMT(pVCpu) \
     641              || pVCpu->CTX_SUFF(pVM)->enmVMState == VMSTATE_GURU_MEDITATION \
     642              || pVCpu->CTX_SUFF(pVM)->enmVMState == VMSTATE_GURU_MEDITATION_LS, \
     643              ("Not emulation thread! Thread=%RTnthrd ThreadEMT=%RTnthrd idCpu=%#x\n", \
     644               RTThreadNativeSelf(), (pVCpu)->hNativeThread, (pVCpu)->idCpu))
     645#endif
     646
     647/** @def VMCPU_ASSERT_EMT_OR_RESET
     648 * Asserts that the current thread IS the emulation thread (EMT) of the
     649 * specified virtual CPU.
     650 */
     651#if defined(IN_RC) || defined(IN_RING0)
     652# define VMCPU_ASSERT_EMT_OR_RESET(pVCpu)   Assert(   VMCPU_IS_EMT(pVCpu) \
     653                                                   || pVCpu->CTX_SUFF(pVM)->enmVMState == VMSTATE_RESETTING \
     654                                                   || pVCpu->CTX_SUFF(pVM)->enmVMState == VMSTATE_RESETTING_LS )
     655#else
     656# define VMCPU_ASSERT_EMT_OR_RESET(pVCpu) \
     657    AssertMsg(   VMCPU_IS_EMT(pVCpu) \
     658              || pVCpu->CTX_SUFF(pVM)->enmVMState == VMSTATE_RESETTING \
     659              || pVCpu->CTX_SUFF(pVM)->enmVMState == VMSTATE_RESETTING_LS, \
     660              ("Not emulation thread! Thread=%RTnthrd ThreadEMT=%RTnthrd idCpu=%#x\n", \
     661               RTThreadNativeSelf(), (pVCpu)->hNativeThread, (pVCpu)->idCpu))
     662#endif
     663
    630664/** @def VM_ASSERT_EMT0
    631665 * Asserts that the current thread IS emulation thread \#0 (EMT0).
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