fesa-core
4.3.1
|
#include <SharedRWLock.h>
Static Public Member Functions | |
static SharedRWLock * | map (void *memory, bool initialize) |
static std::size_t | getSize () |
Additional Inherited Members | |
Public Member Functions inherited from fesa::RWLock | |
void | lockForReading () |
void | lockForWriting () |
void | unlock () |
void | unlock (int nLocksToKeep) |
bool | isReadLockHeld () const |
bool | isWriteLockHeld () const |
bool | isLockHeld () const |
const RWLockStatus & | getLockStatus () const |
Protected Member Functions inherited from fesa::RWLock | |
RWLock (bool initialize) | |
void | checkAlignment () const |
Read-write lock 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 SharedRwLock.
|
static |
Maps (and optionally initializes) a SharedRWLock on the given address.
memory | the address where the SharedRWLock must be mapped. Use getSize() to allocate enough memory. |
initialize | true if the read-write lock should be initialized. Only the first thread to map the SharedRwLock should initialize it. The behavior of the SharedRwLock is undefined if more than one thread calls map() with initialize set to true. |