35 LONG
volatile * Destination,
39#define ScopedSpinlock(LockObject, CodeToRun) \
40 MetaScopedExpr(SpinlockLock(&LockObject), \
41 SpinlockUnlock(&LockObject), \
UCHAR BOOLEAN
Definition BasicTypes.h:39
void SpinlockLock(volatile LONG *Lock)
Tries to get the lock and won't return until successfully get the lock.
Definition Spinlock.c:52
BOOLEAN SpinlockTryLock(volatile LONG *Lock)
Tries to get the lock otherwise returns.
Definition Spinlock.c:41
void SpinlockUnlock(volatile LONG *Lock)
Release the lock.
Definition Spinlock.c:158
void SpinlockInterlockedCompareExchange(LONG volatile *Destination, LONG Exchange, LONG Comperand)
Interlocked spinlock that tries to change the value and makes sure that it changed the target value.
Definition Spinlock.c:88
void SpinlockLockWithCustomWait(volatile LONG *Lock, unsigned MaxWait)
Tries to get the lock and won't return until successfully get the lock.
Definition Spinlock.c:125
BOOLEAN SpinlockCheckLock(volatile LONG *Lock)
Check the lock without changing the state.
Definition Spinlock.c:169