Changeset 44544 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Feb 5, 2013 1:56:17 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c
r44538 r44544 95 95 #endif 96 96 97 #if defined(CONFIG_PROVE_LOCKING) && defined(DO_NOT_DISABLE_PROVE_LOCKING) 98 /* 99 PLEASE DO NOT MODIFY THE NEXT FOUR LINES OF CODE! 100 We use this approach in order to split RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE and 101 RTSPINLOCK_FLAGS_INTERRUPT_SAFE spinlocks into separated locking classes when 102 CONFIG_PROVE_LOCKING kernel option is enabled. Using single spin_lock_init() 103 call will trigger kernel warning regarding to incorrect spinlock usage. 104 */ 105 if (fFlags == RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE) 106 spin_lock_init(&pThis->Spinlock); 107 else 108 spin_lock_init(&pThis->Spinlock); 109 #else 97 110 spin_lock_init(&pThis->Spinlock); 111 #endif 98 112 99 113 *pSpinlock = pThis; … … 131 145 ("pThis=%p u32Magic=%08x\n", pThis, pThis ? (int)pThis->u32Magic : 0)); 132 146 133 #if defined(CONFIG_PROVE_LOCKING) && !defined( RT_STRICT)147 #if defined(CONFIG_PROVE_LOCKING) && !defined(DO_NOT_DISABLE_PROVE_LOCKING) 134 148 lockdep_off(); 135 149 #endif … … 142 156 else 143 157 spin_lock(&pThis->Spinlock); 144 #if defined(CONFIG_PROVE_LOCKING) && !defined( RT_STRICT)158 #if defined(CONFIG_PROVE_LOCKING) && !defined(DO_NOT_DISABLE_PROVE_LOCKING) 145 159 lockdep_on(); 146 160 #endif … … 159 173 RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE(pThis); 160 174 161 #if defined(CONFIG_PROVE_LOCKING) && !defined( RT_STRICT)175 #if defined(CONFIG_PROVE_LOCKING) && !defined(DO_NOT_DISABLE_PROVE_LOCKING) 162 176 lockdep_off(); 163 177 #endif … … 170 184 else 171 185 spin_unlock(&pThis->Spinlock); 172 #if defined(CONFIG_PROVE_LOCKING) && !defined( RT_STRICT)186 #if defined(CONFIG_PROVE_LOCKING) && !defined(DO_NOT_DISABLE_PROVE_LOCKING) 173 187 lockdep_on(); 174 188 #endif
Note:
See TracChangeset
for help on using the changeset viewer.