Changeset 28702 in vbox for trunk/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c
- Timestamp:
- Apr 25, 2010 12:36:09 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c
r22139 r28702 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 68 68 void *pvUniDummy; 69 69 #endif 70 #ifdef RT_STRICT 71 /** Set if we've seen any fNoIrqs usage. 72 * This must be consistent or it won't work you know. */ 73 bool fNoIrqs; 74 #endif 70 75 } RTSPINLOCKINTERNAL, *PRTSPINLOCKINTERNAL; 71 76 … … 89 94 pThis->idCpuOwner = NIL_RTCPUID; 90 95 pThis->idAssertCpu = NIL_RTCPUID; 96 #endif 97 #ifdef RT_STRICT 98 pThis->fNoIrqs = false; 91 99 #endif 92 100 spin_lock_init(&pThis->Spinlock); … … 129 137 130 138 RT_ASSERT_PREEMPT_CPUID_SPIN_ACQUIRED(pThis); 139 #ifdef RT_STRICT 140 pThis->fNoIrqs = true; 141 #endif 131 142 } 132 143 RT_EXPORT_SYMBOL(RTSpinlockAcquireNoInts); … … 141 152 ("pThis=%p u32Magic=%08x\n", pThis, pThis ? (int)pThis->u32Magic : 0)); 142 153 RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE(pThis); 143 NOREF(pTmp);154 Assert(pThis->fNoIrqs); 144 155 145 156 spin_unlock_irqrestore(&pThis->Spinlock, pTmp->flFlags); … … 157 168 ("pThis=%p u32Magic=%08x\n", pThis, pThis ? (int)pThis->u32Magic : 0)); 158 169 NOREF(pTmp); 170 Assert(!pThis->fNoIrqs || !ASMIntAreEnabled()); 159 171 160 172 spin_lock(&pThis->Spinlock); … … 173 185 NOREF(pTmp); 174 186 RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE(pThis); 187 Assert(!pThis->fNoIrqs || !ASMIntAreEnabled()); 175 188 176 189 spin_unlock(&pThis->Spinlock);
Note:
See TracChangeset
for help on using the changeset viewer.