summaryrefslogtreecommitdiff
path: root/include/VBox/vmm/vm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/VBox/vmm/vm.h')
-rw-r--r--include/VBox/vmm/vm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/VBox/vmm/vm.h b/include/VBox/vmm/vm.h
index cbbe7d6679d..f6e288a5958 100644
--- a/include/VBox/vmm/vm.h
+++ b/include/VBox/vmm/vm.h
@@ -239,13 +239,17 @@ typedef struct VMCPU
#define VMCPU_CMPXCHG_STATE(pVCpu, enmNewState, enmOldState) \
ASMAtomicCmpXchgU32((uint32_t volatile *)&(pVCpu)->enmState, (enmNewState), (enmOldState))
/** Checks the VMCPU state. */
-#define VMCPU_ASSERT_STATE(pVCpu, enmExpectedState) \
+#ifdef VBOX_STRICT
+# define VMCPU_ASSERT_STATE(pVCpu, enmExpectedState) \
do { \
VMCPUSTATE enmState = VMCPU_GET_STATE(pVCpu); \
AssertMsg(enmState == (enmExpectedState), \
("enmState=%d enmExpectedState=%d idCpu=%u\n", \
enmState, enmExpectedState, (pVCpu)->idCpu)); \
} while (0)
+#else
+# define VMCPU_ASSERT_STATE(pVCpu, enmExpectedState) do { } while (0)
+#endif
/** Tests if the state means that the CPU is started. */
#define VMCPUSTATE_IS_STARTED(enmState) ( (enmState) > VMCPUSTATE_STOPPED )
/** Tests if the state means that the CPU is stopped. */