MACRO
OMNI_32BIT_BINARY_SEMAPHORE
- If defined, uses 32-bit types in the omni::sync::binary_semaphore
class.
SYNOPSIS top
Signifies to enable the
#define OMNI_32BIT_BINARY_SEMAPHORE
Signifies to enable the
OMNI_32BIT_BINARY_SEMAPHORE
flag and utilize 32-bit types.
DESCRIPTION top
If defined, the
If defined, the
omni::sync::binary_semaphore
class will utilize a 32-bit intergral type for its lock counter, versus a 64-bit type.
CONSIDERATIONS top
A lock counter is kept because a semaphore 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
A lock counter is kept because a semaphore 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().