fesa-core
4.2.0
|
#include <SharedMutex.h>
Static Public Member Functions | |
static SharedMutex * | map (void *memory, bool initialize) |
static std::size_t | getSize () |
Additional Inherited Members | |
![]() | |
void | lock () const |
void | unlock () const |
![]() | |
Mutex (bool init) | |
void | checkAlignment () const |
Mutex that can be shared between threads which don't have the same address space. The first thread shall create it by calling map() with initialize set to true. Additional threads shall map it by calling map() with initialize set to false.
|
static |
Returns the size, in bytes needed to map a SharedMutex.
|
static |
Maps (and optionally initializes) a SharedMutex on the given address.
memory | the address where the SharedMutex must be mapped. Use getSize() to allocate enough memory. |
initialize | true if the mutex should be initialized. Only the first thread to map the SharedMutex should initialize it. The behavior of the SharedMutex is undefined if more than one thread calls map() with initialize set to true. |