Changeset 22075 in vbox for trunk/src/VBox/Runtime/include
- Timestamp:
- Aug 7, 2009 3:37:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/iprt.h
r22071 r22075 55 55 /** @def RT_MORE_STRICT 56 56 * Enables more assertions in IPRT. */ 57 #if !defined(RT_MORE_STRICT) && (defined(DEBUG) || defined(RT_STRICT) || defined(DOXYGEN_RUNNING)) 57 #if !defined(RT_MORE_STRICT) && (defined(DEBUG) || defined(RT_STRICT) || defined(DOXYGEN_RUNNING)) && !defined(RT_OS_WINDOWS) /** @todo enable on windows after testing */ 58 58 # define RT_MORE_STRICT 59 #endif 59 #endif 60 60 61 61 /** @def RT_ASSERT_PREEMPT_CPUID_VAR 62 * Partner to RT_ASSERT_PREEMPT_CPUID_VAR. Declares and initializes a variable 63 * idAssertCpu to NIL_RTCPUID if preemption is enabled and to RTMpCpuId if 64 * disabled. When RT_MORE_STRICT isn't defined it declares an uninitialized 65 * dummy variable. 66 * 67 * Requires iprt/mp.h and iprt/asm.h. 68 */ 62 * Partner to RT_ASSERT_PREEMPT_CPUID_VAR. Declares and initializes a variable 63 * idAssertCpu to NIL_RTCPUID if preemption is enabled and to RTMpCpuId if 64 * disabled. When RT_MORE_STRICT isn't defined it declares an uninitialized 65 * dummy variable. 66 * 67 * Requires iprt/mp.h and iprt/asm.h. 68 */ 69 69 /** @def RT_ASSERT_PREEMPT_CPUID 70 * Asserts that we didn't change CPU since RT_ASSERT_PREEMPT_CPUID_VAR if 71 * preemption is disabled. Will also detect changes in preemption 72 * disable/enable status. This is a noop when RT_MORE_STRICT isn't defined. */ 70 * Asserts that we didn't change CPU since RT_ASSERT_PREEMPT_CPUID_VAR if 71 * preemption is disabled. Will also detect changes in preemption 72 * disable/enable status. This is a noop when RT_MORE_STRICT isn't defined. */ 73 73 #ifdef RT_MORE_STRICT 74 74 # define RT_ASSERT_PREEMPT_CPUID_VAR() \ … … 80 80 AssertMsg(idAssertCpu == idAssertCpuNow, ("%#x, %#x\n", idAssertCpu, idAssertCpuNow)); \ 81 81 } while (0) 82 82 83 83 #else 84 84 # define RT_ASSERT_PREEMPT_CPUID_VAR() RTCPUID idAssertCpuDummy 85 85 # define RT_ASSERT_PREEMPT_CPUID() NOREF(idAssertCpuDummy) 86 #endif 86 #endif 87 87 88 88 /** @def RT_ASSERT_INTS_ON … … 92 92 #else 93 93 # define RT_ASSERT_INTS_ON() do { } while (0) 94 #endif 94 #endif 95 95 96 96 /** @def RT_ASSERT_PREEMPTIBLE 97 * Asserts that preemption hasn't been disabled (using 98 * RTThreadPreemptDisable) when RT_MORE_STRICT is defined. */ 97 * Asserts that preemption hasn't been disabled (using 98 * RTThreadPreemptDisable) when RT_MORE_STRICT is defined. */ 99 99 #ifdef RT_MORE_STRICT 100 100 # define RT_ASSERT_PREEMPTIBLE() Assert(RTThreadPreemptIsEnabled(NIL_RTTHREAD)) 101 101 #else 102 102 # define RT_ASSERT_PREEMPTIBLE() do { } while (0) 103 #endif 103 #endif 104 104 105 105 #endif
Note:
See TracChangeset
for help on using the changeset viewer.