Lines Matching defs:pSpinlockInt
76 PRTSPINLOCKINTERNAL pSpinlockInt = (PRTSPINLOCKINTERNAL)RTMemAllocZ(sizeof(*pSpinlockInt));
77 if (RT_UNLIKELY(!pSpinlockInt))
83 pSpinlockInt->u32Magic = RTSPINLOCK_MAGIC;
84 pSpinlockInt->fFlags = fFlags;
85 pSpinlockInt->fIntSaved = 0;
86 B_INITIALIZE_SPINLOCK(&pSpinlockInt->hSpinLock);
88 *pSpinlock = pSpinlockInt;
98 PRTSPINLOCKINTERNAL pSpinlockInt = (PRTSPINLOCKINTERNAL)Spinlock;
99 if (RT_UNLIKELY(!pSpinlockInt))
101 AssertMsgReturn(pSpinlockInt->u32Magic == RTSPINLOCK_MAGIC,
102 ("Invalid spinlock %p magic=%#x\n", pSpinlockInt, pSpinlockInt->u32Magic),
108 ASMAtomicIncU32(&pSpinlockInt->u32Magic);
110 B_INITIALIZE_SPINLOCK(&pSpinlockInt->hSpinLock);
112 RTMemFree(pSpinlockInt);
119 PRTSPINLOCKINTERNAL pSpinlockInt = (PRTSPINLOCKINTERNAL)Spinlock;
120 AssertPtr(pSpinlockInt);
121 Assert(pSpinlockInt->u32Magic == RTSPINLOCK_MAGIC);
124 pSpinlockInt->fIntSaved = disable_interrupts();
125 acquire_spinlock(&pSpinlockInt->hSpinLock);
131 PRTSPINLOCKINTERNAL pSpinlockInt = (PRTSPINLOCKINTERNAL)Spinlock;
132 AssertPtr(pSpinlockInt);
133 Assert(pSpinlockInt->u32Magic == RTSPINLOCK_MAGIC);
135 release_spinlock(&pSpinlockInt->hSpinLock);
136 restore_interrupts(pSpinlockInt->fIntSaved);