API for platform independent spinlock synchronization primitive.
typedef <..native type..> Spinlock;
Initialize a Spinlock
spinlock - spinlock to initialize.
Lock a Spinlock
spinlock - spinlock to lock.
Unlock a Spinlock
spinlock - spinlock to unlock.
Will lock a Spinlock and automatically unlock it at the end of the scope.
mutex - Spinlock reference to lock.