fesa-core
5.0.1
|
#include <SharedMutex.h>
Static Public Member Functions | |
static SharedMutex * | map (void *memory, bool initialize) |
static std::size_t | getSize () |
Additional Inherited Members | |
Public Member Functions inherited from fesa::Mutex | |
void | lock () const |
void | unlock () const |
Protected Member Functions inherited from fesa::Mutex | |
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. |