Spinlock

API for platform independent spinlock synchronization primitive.

dmSpinlock::Spinlock

Spinlock type definition

typedef <..native type..> Spinlock;


dmSpinlock::Init(spinlock)

initalize spinlock.

Initialize a Spinlock

PARAMETERS

spinlock - spinlock to initialize.


dmSpinlock::Lock(spinlock)

lock spinlock.

Lock a Spinlock

PARAMETERS

spinlock - spinlock to lock.


dmSpinlock::Unlock(spinlock)

unlock spinlock.

Unlock a Spinlock

PARAMETERS

spinlock - spinlock to unlock.


DM_SPINLOCK_SCOPED_LOCK

macro for using a spinlock during a scope

Will lock a Spinlock and automatically unlock it at the end of the scope.

PARAMETERS

mutex - Spinlock reference to lock.