- Timestamp:
- Feb 7, 2013 11:03:25 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83654
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/Makefile
r44544 r44579 271 271 endif 272 272 273 # Uncomment this in order to avoid spinlock checker274 # disabling when CONFIG_PROVE_LOCKING is enabled275 #KFLAGS += -DDO_NOT_DISABLE_PROVE_LOCKING276 277 273 # 2.6 and later 278 274 MODULE_EXT := ko -
trunk/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c
r44544 r44579 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 and101 RTSPINLOCK_FLAGS_INTERRUPT_SAFE spinlocks into separated locking classes when102 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 else108 spin_lock_init(&pThis->Spinlock);109 #else110 97 spin_lock_init(&pThis->Spinlock); 111 #endif112 98 113 99 *pSpinlock = pThis; … … 145 131 ("pThis=%p u32Magic=%08x\n", pThis, pThis ? (int)pThis->u32Magic : 0)); 146 132 147 #if defined(CONFIG_PROVE_LOCKING) && !defined( DO_NOT_DISABLE_PROVE_LOCKING)133 #if defined(CONFIG_PROVE_LOCKING) && !defined(RT_STRICT) 148 134 lockdep_off(); 149 135 #endif … … 156 142 else 157 143 spin_lock(&pThis->Spinlock); 158 #if defined(CONFIG_PROVE_LOCKING) && !defined( DO_NOT_DISABLE_PROVE_LOCKING)144 #if defined(CONFIG_PROVE_LOCKING) && !defined(RT_STRICT) 159 145 lockdep_on(); 160 146 #endif … … 173 159 RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE(pThis); 174 160 175 #if defined(CONFIG_PROVE_LOCKING) && !defined( DO_NOT_DISABLE_PROVE_LOCKING)161 #if defined(CONFIG_PROVE_LOCKING) && !defined(RT_STRICT) 176 162 lockdep_off(); 177 163 #endif … … 184 170 else 185 171 spin_unlock(&pThis->Spinlock); 186 #if defined(CONFIG_PROVE_LOCKING) && !defined( DO_NOT_DISABLE_PROVE_LOCKING)172 #if defined(CONFIG_PROVE_LOCKING) && !defined(RT_STRICT) 187 173 lockdep_on(); 188 174 #endif
Note:
See TracChangeset
for help on using the changeset viewer.