#include <Sync.h>
Public Member Functions | |
Semaphore (int initialcount=0, int maxcount=0) | |
~Semaphore () | |
bool | IsOk () const |
bool | Wait () |
bool | TryWait () |
bool | Post () |
Private Attributes | |
Mutex | m_mutex |
Condition | m_cond |
int | m_count |
int | m_maxcount |
bool | m_isOk |
Semaphore | ( | int | initialcount = 0 , |
int | maxcount = 0 |
||
) |
Definition at line 170 of file Sync.C.
References Mutex::IsOk(), Condition::IsOk(), m_cond, m_count, m_isOk, m_maxcount, and m_mutex.
|
inline |
bool Post | ( | ) |
Definition at line 223 of file Sync.C.
References Mutex::Lock(), m_cond, m_count, m_maxcount, m_mutex, Condition::Signal(), and Mutex::Unlock().
bool TryWait | ( | ) |
Definition at line 208 of file Sync.C.
References Mutex::Lock(), m_count, m_mutex, and Mutex::Unlock().
bool Wait | ( | ) |
Definition at line 191 of file Sync.C.
References Mutex::Lock(), m_cond, m_count, m_mutex, Mutex::Unlock(), and Condition::Wait().
|
private |
Definition at line 79 of file Sync.h.
Referenced by Post(), Semaphore(), and Wait().
|
private |
|
private |
Definition at line 82 of file Sync.h.
Referenced by IsOk(), and Semaphore().
|
private |
Definition at line 81 of file Sync.h.
Referenced by Post(), and Semaphore().
|
private |