OMNI_32BIT_SPIN
MACRO

OMNI_32BIT_SPIN - If defined, uses 32-bit types in the spin classes.

SYNOPSIS top

#define OMNI_32BIT_SPIN

Signifies to enable the OMNI_32BIT_SPIN flag and utilize 32-bit types.

DESCRIPTION top

If defined, the omni::sync::spin_lock and omni::sync::spin_Wait classes will utilize a 32-bit intergral type for their lock counters/status, versus a 64-bit type.

CONSIDERATIONS top

A lock counter is kept because a spin-lock type cannot be destroyed while locked; due to this, if a lock operation is preformed more than the maximum value for the underlying lock counter type, an overflow can occur and put the lock into an undefined state. For example, if this flag is defined then the lock's counter type will be 32-bit, thus the maximum number of lock operations that can be preforemd without an unlock operation is std::numeric_limits<uint32_t>::max().

PLATFORM SPECIFIC top

No platform specific notes.

NOTES top

See the considerations for this flag.