Changeset 22129 in vbox
- Timestamp:
- Aug 10, 2009 12:12:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/spinlock-r0drv-solaris.c
r22126 r22129 41 41 #include <iprt/err.h> 42 42 #include <iprt/mem.h> 43 #include <iprt/mp.h> 43 44 #include <iprt/thread.h> 44 45 #include "internal/magics.h" … … 112 113 113 114 pTmp->uFlags = ASMIntDisableFlags(); 114 mutex_enter(&pSpinlockInt->Mtx); 115 { 116 RT_ASSERT_PREEMPT_CPUID_VAR(); 117 mutex_enter(&pSpinlockInt->Mtx); 118 RT_ASSERT_PREEMPT_CPUID(); 119 } 115 120 } 116 121 … … 130 135 { 131 136 PRTSPINLOCKINTERNAL pSpinlockInt = (PRTSPINLOCKINTERNAL)Spinlock; 137 RT_ASSERT_PREEMPT_CPUID_VAR(); 132 138 AssertPtr(pSpinlockInt); 133 139 Assert(pSpinlockInt->u32Magic == RTSPINLOCK_MAGIC); … … 135 141 136 142 mutex_enter(&pSpinlockInt->Mtx); 143 RT_ASSERT_PREEMPT_CPUID(); 144 #ifdef RT_MORE_STRICT 145 /* Spinlocks are not preemptible, so we cannot be rescheduled. */ 146 pTmp->uFlags = idAssertCpu != NIL_RTCPUID ? idAssertCpu : RTMpCpuId(); 147 #endif 137 148 } 138 149 … … 141 152 { 142 153 PRTSPINLOCKINTERNAL pSpinlockInt = (PRTSPINLOCKINTERNAL)Spinlock; 154 #ifdef RT_MORE_STRICT 155 RTCPUID const idAssertCpu = pTmp->uFlags; 156 pTmp->uFlags = 0; 157 #endif 143 158 AssertPtr(pSpinlockInt); 144 159 Assert(pSpinlockInt->u32Magic == RTSPINLOCK_MAGIC); 160 RT_ASSERT_PREEMPT_CPUID(); 145 161 NOREF(pTmp); 146 162
Note:
See TracChangeset
for help on using the changeset viewer.