IBR-DTNSuite
0.8
|
#include <Conditional.h>
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.
Definition at line 15 of file Conditional.cpp.
ibrcommon::Conditional::~Conditional | ( | ) | [virtual] |
Definition at line 20 of file Conditional.cpp.
void ibrcommon::Conditional::abort | ( | ) |
Abort all waits on this conditional.
Definition at line 134 of file Conditional.cpp.
References signal().
Referenced by ibrcommon::Timer::__cancellation(), dtn::api::Registration::abort(), ibrcommon::Queue< StaticRoutingExtension::Task * >::abort(), dtn::core::EventSwitch::componentDown(), dtn::net::DatagramConnection::finally(), dtn::core::EventSwitch::raiseEvent(), term(), and dtn::api::APIClient::unblock_wait().
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 112 of file Conditional.cpp.
Referenced by ibrcommon::Queue< StaticRoutingExtension::Task * >::__wait().
void ibrcommon::Conditional::reset | ( | ) |
Removes the abort call off this conditional.
Definition at line 145 of file Conditional.cpp.
Referenced by ibrcommon::Queue< StaticRoutingExtension::Task * >::__wait(), dtn::api::Registration::detach(), and ibrcommon::Queue< StaticRoutingExtension::Task * >::reset().
void ibrcommon::Conditional::signal | ( | bool | broadcast = false | ) |
Definition at line 36 of file Conditional.cpp.
Referenced by dtn::api::APIClient::__get_return(), ibrcommon::Queue< StaticRoutingExtension::Task * >::__pop(), ibrcommon::Queue< StaticRoutingExtension::Task * >::__push(), ibrcommon::stopandwait::__recv(), ibrcommon::lowpanstream::abort(), abort(), dtn::net::DatagramConnection::ack(), dtn::net::DatagramConvergenceLayer::connectionDown(), dtn::core::Event::decrement_ref_count(), ibrcommon::iobuffer::finalize(), dtn::api::Registration::notify(), ibrcommon::AtomicCounter::operator++(), ibrcommon::AtomicCounter::operator--(), ibrcommon::ThreadsafeState< THREAD_STATE >::operator=(), ibrcommon::iobuffer::overflow(), ibrcommon::Queue< StaticRoutingExtension::Task * >::push(), ibrcommon::lowpanstream::queue(), dtn::core::EventSwitch::raiseEvent(), BundleStreamBuf::received(), ibrcommon::StatefulConditional< Timer::TIMER_STATE, TIMER_STOPPED >::setState(), dtn::core::WallClock::timeout(), ibrcommon::AtomicCounter::unblockAll(), ibrcommon::iobuffer::underflow(), ibrcommon::lowpanstream::underflow(), dtn::api::APIClient::wait(), and ibrcommon::ThreadsafeState< THREAD_STATE >::~ThreadsafeState().
void ibrcommon::Conditional::wait | ( | size_t | timeout = 0 | ) | throw (ConditionalAbortException) |
Definition at line 51 of file Conditional.cpp.
Referenced by dtn::api::APIClient::__get_return(), ibrcommon::stopandwait::__send(), BundleStreamBuf::__underflow(), ibrcommon::Queue< StaticRoutingExtension::Task * >::__wait(), ibrcommon::lowpanstream::abort(), dtn::core::EventSwitch::componentDown(), main(), ibrcommon::ObjectLock::ObjectLock(), ibrcommon::iobuffer::overflow(), ibrcommon::lowpanstream::queue(), dtn::core::Event::raiseEvent(), ibrcommon::Timer::run(), dtn::core::WallClock::sync(), ibrcommon::iobuffer::underflow(), ibrcommon::lowpanstream::underflow(), ibrcommon::AtomicCounter::wait(), dtn::api::APIClient::wait(), dtn::api::Registration::wait_for_bundle(), ibrcommon::StatefulConditional< Timer::TIMER_STATE, TIMER_STOPPED >::waitState(), and dtn::net::DatagramConvergenceLayer::~DatagramConvergenceLayer().
void ibrcommon::Conditional::wait | ( | struct timespec * | ts | ) | throw (ConditionalAbortException) |
Definition at line 74 of file Conditional.cpp.