Changeset 68851 in vbox for trunk/include
- Timestamp:
- Sep 25, 2017 12:38:46 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r66227 r68851 825 825 # define VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu) \ 826 826 Assert( VMCPU_IS_EMT(pVCpu) \ 827 || !VM_IS_RUNNING ((pVCpu)->CTX_SUFF(pVM)) )827 || !VM_IS_RUNNING_FOR_ASSERTIONS_ONLY((pVCpu)->CTX_SUFF(pVM)) ) 828 828 #else 829 829 # define VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu) \ 830 830 AssertMsg( VMCPU_IS_EMT(pVCpu) \ 831 || !VM_IS_RUNNING ((pVCpu)->CTX_SUFF(pVM)), \831 || !VM_IS_RUNNING_FOR_ASSERTIONS_ONLY((pVCpu)->CTX_SUFF(pVM)), \ 832 832 ("Not emulation thread! Thread=%RTnthrd ThreadEMT=%RTnthrd idCpu=%#x\n", \ 833 833 RTThreadNativeSelf(), (pVCpu)->hNativeThread, (pVCpu)->idCpu)) 834 834 #endif 835 835 836 /** @def VM_IS_RUNNING 836 /** @def VM_IS_RUNNING_FOR_ASSERTIONS_ONLY 837 837 * Checks if the the VM is running. 838 */ 839 #define VM_IS_RUNNING(pVM) ( (pVM)->enmVMState == VMSTATE_RUNNING \ 840 || (pVM)->enmVMState == VMSTATE_RUNNING_LS \ 841 || (pVM)->enmVMState == VMSTATE_RUNNING_FT) 838 * @note Thie is only for pure debug assertions. No AssertReturn or similar! 839 */ 840 #define VM_IS_RUNNING_FOR_ASSERTIONS_ONLY(pVM) \ 841 ( (pVM)->enmVMState == VMSTATE_RUNNING \ 842 || (pVM)->enmVMState == VMSTATE_RUNNING_LS \ 843 || (pVM)->enmVMState == VMSTATE_RUNNING_FT ) 842 844 843 845 /** @def VM_ASSERT_IS_NOT_RUNNING … … 845 847 */ 846 848 #if defined(IN_RC) || defined(IN_RING0) 847 #define VM_ASSERT_IS_NOT_RUNNING(pVM) Assert(!VM_IS_RUNNING (pVM))848 #else 849 #define VM_ASSERT_IS_NOT_RUNNING(pVM) AssertMsg(!VM_IS_RUNNING (pVM), ("VM is running. enmVMState=%d\n", \850 ( pVM)->enmVMState))849 #define VM_ASSERT_IS_NOT_RUNNING(pVM) Assert(!VM_IS_RUNNING_FOR_ASSERTIONS_ONLY(pVM)) 850 #else 851 #define VM_ASSERT_IS_NOT_RUNNING(pVM) AssertMsg(!VM_IS_RUNNING_FOR_ASSERTIONS_ONLY(pVM), \ 852 ("VM is running. enmVMState=%d\n", (pVM)->enmVMState)) 851 853 #endif 852 854
Note:
See TracChangeset
for help on using the changeset viewer.