Changeset 22139 in vbox
- Timestamp:
- Aug 10, 2009 2:18:37 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/iprt.h
r22135 r22139 107 107 * RTSpinlockRelease* returns. */ 108 108 #ifdef RT_MORE_STRICT 109 # define RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE_VARS() RTCPUID idAssertCpu , idAssertCpuAfter109 # define RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE_VARS() RTCPUID idAssertCpu 110 110 #else 111 111 # define RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE_VARS() RTCPUID idAssertCpuDummy … … 120 120 do \ 121 121 { \ 122 idAssertCpu= (pThis)->idCpuOwner; \123 idAssertCpuAfter = (pThis)->idAssertCpu; \124 RT_ASSERT_PREEMPT_CPUID(); \122 RTCPUID const idCpuOwner = (pThis)->idCpuOwner; \ 123 RTCPUID const idAssertCpuNow = RTMpCpuId(); \ 124 AssertMsg(idCpuOwner == idAssertCpuNow, ("%#x, %#x\n", idCpuOwner, idAssertCpuNow)); \ 125 125 (pThis)->idCpuOwner = NIL_RTCPUID; \ 126 idAssertCpu = (pThis)->idAssertCpu; \ 126 127 (pThis)->idAssertCpu = NIL_RTCPUID; \ 127 128 } while (0) 128 129 #else 129 130 # define RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE(pThis) NOREF(idAssertCpuDummy) 130 #endif131 132 /** @def RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASED133 * Extended version of RT_ASSERT_PREEMPT_CPUID for use in RTSpinlockRelease*134 * after having released the spinlock. It must be teamed up with135 * RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE. */136 #ifdef RT_MORE_STRICT137 # define RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASED() \138 do \139 { \140 idAssertCpu = idAssertCpuAfter; \141 RT_ASSERT_PREEMPT_CPUID(); \142 } while (0)143 #else144 # define RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASED() NOREF(idAssertCpuDummy)145 131 #endif 146 132 -
trunk/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c
r22131 r22139 145 145 spin_unlock_irqrestore(&pThis->Spinlock, pTmp->flFlags); 146 146 147 RT_ASSERT_PREEMPT_CPUID _SPIN_RELEASED();147 RT_ASSERT_PREEMPT_CPUID(); 148 148 } 149 149 RT_EXPORT_SYMBOL(RTSpinlockReleaseNoInts); … … 176 176 spin_unlock(&pThis->Spinlock); 177 177 178 RT_ASSERT_PREEMPT_CPUID _SPIN_RELEASED();178 RT_ASSERT_PREEMPT_CPUID(); 179 179 } 180 180 RT_EXPORT_SYMBOL(RTSpinlockRelease); -
trunk/src/VBox/Runtime/r0drv/solaris/spinlock-r0drv-solaris.c
r22134 r22139 141 141 ASMSetFlags(pTmp->uFlags); 142 142 143 RT_ASSERT_PREEMPT_CPUID _SPIN_RELEASED();143 RT_ASSERT_PREEMPT_CPUID(); 144 144 } 145 145 … … 171 171 mutex_exit(&pThis->Mtx); 172 172 173 RT_ASSERT_PREEMPT_CPUID _SPIN_RELEASED();173 RT_ASSERT_PREEMPT_CPUID(); 174 174 } 175 175
Note:
See TracChangeset
for help on using the changeset viewer.