- Timestamp:
- Apr 16, 2012 7:25:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/spinlock-generic.cpp
r40806 r40951 136 136 for (;;) 137 137 { 138 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 138 139 ASMIntDisable(); 140 #endif 139 141 for (int c = RT_CFG_SPINLOCK_GENERIC_DO_SLEEP; c > 0; c--) 140 142 { … … 148 150 ASMNopPause(); 149 151 } 152 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 150 153 ASMSetFlags(fIntSaved); 154 #endif 151 155 RTThreadYield(); 152 156 } … … 154 158 for (;;) 155 159 { 160 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 156 161 ASMIntDisable(); 162 #endif 157 163 if (ASMAtomicCmpXchgU32(&pThis->fLocked, 1, 0)) 158 164 { … … 162 168 return; 163 169 } 170 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 164 171 ASMSetFlags(fIntSaved); 172 #endif 165 173 ASMNopPause(); 166 174 }
Note:
See TracChangeset
for help on using the changeset viewer.