B2BITS FIX Antenna C++ 2.33.0
|
Semaphore - a general synchronization mechanism. More...
#include <B2BITS_Semaphore.h>
Public Member Functions | |
void | post () |
Unlocks the semaphore. | |
Semaphore () | |
Constructor. | |
Semaphore (int aValue) | |
Constructor. | |
void | wait () |
Locks the semaphore. | |
~Semaphore () | |
Destructor. | |
Semaphore - a general synchronization mechanism.
System::Semaphore::Semaphore | ( | ) |
Constructor.
Sets the semaphore's value to 0.
System::Semaphore::Semaphore | ( | int | aValue | ) |
Constructor.
Sets the semaphore to the given value.
aValue | Value to initialize semaphore with. |
System::Semaphore::~Semaphore | ( | ) |
Destructor.
|
inline |
Unlocks the semaphore.
If the semaphore value resulting from this operation is positive, then no threads were blocked waiting for the semaphore to become unlocked; the semaphore value is simply incremented.
If the value of the semaphore resulting from this operation is 0, then one of the threads blocked waiting for the semaphore will be allowed to return successfully from its call to wait().
This method is reentrant with respect to signals and may be invoked from a signal-catching function.
|
inline |
Locks the semaphore.
If the semaphore value is currently zero, then the calling thread will not return from this method until it either locks the semaphore or the call is interrupted by a signal.