#include <Conditional.h>
Inherits ibrcommon::Mutex.
Inherited by dtn::core::WallClock, ibrcommon::StatefulConditional< T, block >, and ibrcommon::StatefulConditional< Timer::TIMER_STATE, TIMER_STOPPED >.

Classes | |
| class | attribute |
| class | ConditionalAbortException |
Public Member Functions | |
| Conditional () | |
| virtual | ~Conditional () |
| void | signal (bool broadcast=false) |
| void | wait (size_t timeout=0) throw (ConditionalAbortException) |
| void | wait (struct timespec *ts) throw (ConditionalAbortException) |
| void | abort () |
| void | reset () |
Static Public Member Functions | |
| static void | gettimeout (size_t timeout, struct timespec *hires) |
Definition at line 12 of file Conditional.h.
| ibrcommon::Conditional::Conditional | ( | ) |
Definition at line 11 of file Conditional.cpp.
| ibrcommon::Conditional::~Conditional | ( | ) | [virtual] |
Definition at line 16 of file Conditional.cpp.
| void ibrcommon::Conditional::abort | ( | ) |
Abort all waits on this conditional.
Definition at line 122 of file Conditional.cpp.
References signal().
Referenced by ibrcommon::SimpleTimer::__cancellation(), ibrcommon::Timer::__cancellation(), and ibrcommon::Queue< Task * >::abort().

| void ibrcommon::Conditional::gettimeout | ( | size_t | timeout, | |
| struct timespec * | hires | |||
| ) | [static] |
Convert a millisecond timeout into use for high resolution conditional timers.
| timeout | to convert. | |
| hires | timespec representation to fill. |
Definition at line 102 of file Conditional.cpp.
Referenced by ibrcommon::Queue< Task * >::__wait(), and ibrcommon::SimpleTimer::run().
| void ibrcommon::Conditional::reset | ( | ) |
Removes the abort call off this conditional.
Definition at line 131 of file Conditional.cpp.
Referenced by ibrcommon::Queue< Task * >::__wait().
| void ibrcommon::Conditional::signal | ( | bool | broadcast = false |
) |
Definition at line 32 of file Conditional.cpp.
Referenced by dtn::core::SQLiteBundleStorage::__cancellation(), ibrcommon::Queue< Task * >::__pop(), ibrcommon::Queue< Task * >::__push(), ibrcommon::stopandwait::__recv(), abort(), ibrcommon::AtomicCounter::operator++(), ibrcommon::AtomicCounter::operator--(), ibrcommon::Queue< Task * >::push(), dtn::core::SQLiteBundleStorage::raiseEvent(), ibrcommon::Thread::ready(), ibrcommon::StatefulConditional< Timer::TIMER_STATE, TIMER_STOPPED >::setState(), dtn::core::WallClock::timeout(), and ibrcommon::AtomicCounter::unblockAll().
| void ibrcommon::Conditional::wait | ( | struct timespec * | ts | ) | throw (ConditionalAbortException) |
Definition at line 66 of file Conditional.cpp.
| void ibrcommon::Conditional::wait | ( | size_t | timeout = 0 |
) | throw (ConditionalAbortException) |
Definition at line 45 of file Conditional.cpp.
Referenced by ibrcommon::stopandwait::__send(), ibrcommon::Queue< Task * >::__wait(), ibrcommon::SimpleTimer::run(), ibrcommon::Timer::run(), dtn::core::SQLiteBundleStorage::run(), dtn::core::WallClock::sync(), ibrcommon::AtomicCounter::wait(), ibrcommon::Thread::waitready(), and ibrcommon::StatefulConditional< Timer::TIMER_STATE, TIMER_STOPPED >::waitState().
1.7.1