Sdk spinlock api documentation

API for platform independent spinlock synchronization primitive.

Namespace: dmSpinlock
Include: #include <dmsdk/dlib/spinlock.h>
TYPES
dmSpinlock::Spinlock Spinlock type definition
FUNCTIONS
void dmSpinlock::Init(dmSpinlock::Spinlock* spinlock) initalize spinlock.
void dmSpinlock::Lock(dmSpinlock::Spinlock* spinlock) lock spinlock.
void dmSpinlock::Unlock(dmSpinlock::Spinlock* spinlock) unlock spinlock.
MACROS
DM_SPINLOCK_SCOPED_LOCK(mutex) macro for using a spinlock during a scope

Functions

dmSpinlock::Init

void dmSpinlock::Init(dmSpinlock::Spinlock* spinlock)

Initialize a Spinlock

PARAMETERS

dmSpinlock::Spinlock* spinlock spinlock to initialize.

dmSpinlock::Lock

void dmSpinlock::Lock(dmSpinlock::Spinlock* spinlock)

Lock a Spinlock

PARAMETERS

dmSpinlock::Spinlock* spinlock spinlock to lock.

dmSpinlock::Unlock

void dmSpinlock::Unlock(dmSpinlock::Spinlock* spinlock)

Unlock a Spinlock

PARAMETERS

dmSpinlock::Spinlock* spinlock spinlock to unlock.

Types

dmSpinlock::Spinlock

typedef <..native type..> Spinlock;


Macros

DM_SPINLOCK_SCOPED_LOCK

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

mutex Spinlock reference to lock.