Implements a platform independent mutex. More...
#include <Semaphore.h>
Public Member Functions | |
void | post () |
Increments the semaphore. | |
Semaphore (size_t initial_value=1) | |
bool | wait () |
virtual | ~Semaphore () |
Private Attributes | |
SemaphoreImpl * | m_impl |
Implements a platform independent mutex.
Definition at line 44 of file Semaphore.h.
icl_core::logging::Semaphore::Semaphore | ( | size_t | initial_value = 1 | ) |
Definition at line 30 of file Semaphore.cpp.
icl_core::logging::Semaphore::~Semaphore | ( | ) | [virtual] |
Definition at line 61 of file Semaphore.cpp.
void icl_core::logging::Semaphore::post | ( | ) |
Increments the semaphore.
Definition at line 67 of file Semaphore.cpp.
bool icl_core::logging::Semaphore::wait | ( | ) |
Decrements the semaphore. If the semaphore is unavailable this function blocks.
true
if the semaphore has been decremented, false
otherwise. Definition at line 72 of file Semaphore.cpp.
Definition at line 79 of file Semaphore.h.