A semaphore class. More...
#include <xsens_mutex.h>
Public Member Functions | |
int32_t | post (int32_t increment=1) noexcept |
Increases the count of the specified semaphore object by a specified amount. More... | |
Semaphore (int32_t initVal=0, uint32_t nofOtherHandles=0, sem_t *otherHandles=NULL) | |
Constructor. More... | |
bool | wait1 () |
Waits for an infinite time or until the semaphore is released. More... | |
bool | wait1 (uint32_t timeout) |
Waits until time-out interval elapses or until the semaphore is released. More... | |
~Semaphore () | |
Destructor. More... | |
Protected Member Functions | |
Semaphore & | operator= (Semaphore &&)=delete |
Semaphore & | operator= (Semaphore const &)=delete |
Semaphore (Semaphore &&)=delete | |
Semaphore (Semaphore const &)=delete | |
Protected Attributes | |
sem_t * | m_handle |
A semaphore's handle. More... | |
uint32_t | m_nofHandles |
A number of the semaphore's handles. More... | |
char * | m_semname |
A name of the semaphore. More... | |
A semaphore class.
Definition at line 1718 of file xsens_mutex.h.
|
protecteddelete |
|
protecteddelete |
xsens::Semaphore::Semaphore | ( | int32_t | initVal = 0 , |
uint32_t | nofOtherHandles = 0 , |
||
sem_t * | otherHandles = NULL |
||
) |
Constructor.
Definition at line 803 of file threading.cpp.
xsens::Semaphore::~Semaphore | ( | ) |
Destructor.
Definition at line 834 of file threading.cpp.
Increases the count of the specified semaphore object by a specified amount.
increment | The amount by which the semaphore object's current count is to be increased |
Definition at line 882 of file threading.cpp.
bool xsens::Semaphore::wait1 | ( | ) |
Waits for an infinite time or until the semaphore is released.
Definition at line 841 of file threading.cpp.
bool xsens::Semaphore::wait1 | ( | uint32_t | timeout | ) |
Waits until time-out interval elapses or until the semaphore is released.
timeout | The timeout value to use |
Definition at line 846 of file threading.cpp.
|
protected |
A semaphore's handle.
Definition at line 1725 of file xsens_mutex.h.
|
protected |
A number of the semaphore's handles.
Definition at line 1727 of file xsens_mutex.h.
|
protected |
A name of the semaphore.
Definition at line 1724 of file xsens_mutex.h.