#include <semaphore.hh>
|
| | Semaphore (unsigned int count=0) |
| |
| void | P () |
| |
| void | V () |
| |
| template<typename duration_type > |
| bool | P (duration_type const &rel_time) |
| |
| bool | try_P () |
| |
|
| unsigned int | count |
| |
| boost::condition_variable | cond |
| |
| boost::mutex | mut |
| |
◆ Semaphore()
| Scroom::Semaphore::Semaphore |
( |
unsigned int |
count = 0 | ) |
|
|
inlineexplicit |
◆ P() [1/2]
| void Scroom::Semaphore::P |
( |
| ) |
|
|
inline |
◆ P() [2/2]
template<typename duration_type >
| bool Scroom::Semaphore::P |
( |
duration_type const & |
rel_time | ) |
|
|
inline |
63 boost::posix_time::ptime
const timeout = boost::posix_time::second_clock::universal_time() + rel_time;
65 boost::mutex::scoped_lock lock(
mut);
68 if(!
cond.timed_wait(lock, timeout))
◆ try_P()
| bool Scroom::Semaphore::try_P |
( |
| ) |
|
|
inline |
◆ V()
| void Scroom::Semaphore::V |
( |
| ) |
|
|
inline |
◆ cond
| boost::condition_variable Scroom::Semaphore::cond |
|
private |
◆ count
| unsigned int Scroom::Semaphore::count |
|
private |
◆ mut
| boost::mutex Scroom::Semaphore::mut |
|
private |
The documentation for this class was generated from the following file: