OW_NAMESPACE::Condition Class Reference

#include <OW_Condition.hpp>

List of all members.

Public Member Functions

 Condition ()
 ~Condition ()
void notifyOne ()
void notifyAll ()
void wait (NonRecursiveMutexLock &lock)
 Atomically unlocks the mutex and waits for the condition variable to be notified.
bool timedWait (NonRecursiveMutexLock &lock, UInt32 sTimeout, UInt32 usTimeout=0)
 Acquire ownership of this Mutex object.

Private Member Functions

 Condition (const Condition &)
Conditionoperator= (const Condition &)
void doWait (NonRecursiveMutex &mutex)
bool doTimedWait (NonRecursiveMutex &mutex, UInt32 sTimeout, UInt32 usTimeout)

Private Attributes

ConditionVar_t m_condition


Detailed Description

Definition at line 48 of file OW_Condition.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::Condition::Condition  ) 
 

Definition at line 52 of file OW_Condition.cpp.

References m_condition, and OW_THROW.

OW_NAMESPACE::Condition::~Condition  ) 
 

Definition at line 61 of file OW_Condition.cpp.

References m_condition.

OW_NAMESPACE::Condition::Condition const Condition  )  [private]
 


Member Function Documentation

bool OW_NAMESPACE::Condition::doTimedWait NonRecursiveMutex mutex,
UInt32  sTimeout,
UInt32  usTimeout
[private]
 

Definition at line 93 of file OW_Condition.cpp.

References OW_NAMESPACE::NonRecursiveMutex::conditionPostWait(), OW_NAMESPACE::NonRecursiveMutex::conditionPreWait(), ETIMEDOUT, m_condition, and state.

void OW_NAMESPACE::Condition::doWait NonRecursiveMutex mutex  )  [private]
 

Definition at line 82 of file OW_Condition.cpp.

References OW_NAMESPACE::NonRecursiveMutex::conditionPostWait(), OW_NAMESPACE::NonRecursiveMutex::conditionPreWait(), m_condition, and state.

void OW_NAMESPACE::Condition::notifyAll  ) 
 

Definition at line 75 of file OW_Condition.cpp.

References m_condition.

Referenced by OW_NAMESPACE::PollingManagerThread::addPolledProvider(), OW_NAMESPACE::ThreadCounter::decThreadCount(), OW_NAMESPACE::PollingManagerThread::doCooperativeCancel(), OW_NAMESPACE::IndicationServerImplThread::doCooperativeCancel(), OW_NAMESPACE::Thread::doneRunning(), OW_NAMESPACE::RWLocker::doWakeups(), OW_NAMESPACE::CppProviderIFC::CppProviderInitializationHelper::initialize(), OW_NAMESPACE::ThreadCounter::setMax(), OW_NAMESPACE::PollingManagerThread::shutdown(), OW_NAMESPACE::IndicationServerImplThread::shutdown(), and OW_NAMESPACE::Semaphore::signal().

void OW_NAMESPACE::Condition::notifyOne  ) 
 

Definition at line 68 of file OW_Condition.cpp.

References m_condition.

Referenced by OW_NAMESPACE::RWLocker::doWakeups(), OW_NAMESPACE::IndicationServerImplThread::processIndication(), and OW_NAMESPACE::PollingManagerThread::TriggerRunner::run().

Condition& OW_NAMESPACE::Condition::operator= const Condition  )  [private]
 

bool OW_NAMESPACE::Condition::timedWait NonRecursiveMutexLock lock,
UInt32  sTimeout,
UInt32  usTimeout = 0
 

Acquire ownership of this Mutex object.

This call will block if another thread has ownership of this Mutex. When it returns, the current thread will be the owner of this Mutex object.

Parameters:
sTimeout The number of seconds to wait for the mutex.
usTimeout The number of micro seconds (1/1000000th) to wait The total wait time is sTimeout * 1000000 + usTimeout micro seconds. This function should always be called within a while loop that checks the condition.
Returns:
true if the lock was acquired, false if timeout occurred.

Definition at line 259 of file OW_Condition.cpp.

References OW_NAMESPACE::NonRecursiveMutexLock::isLocked(), and OW_THROW.

Referenced by OW_NAMESPACE::Thread::definitiveCancel(), OW_NAMESPACE::RWLocker::getReadLock(), OW_NAMESPACE::ThreadCounter::incThreadCount(), OW_NAMESPACE::Semaphore::timedWait(), and OW_NAMESPACE::ThreadCounter::waitForAll().

void OW_NAMESPACE::Condition::wait NonRecursiveMutexLock lock  ) 
 

Atomically unlocks the mutex and waits for the condition variable to be notified.

The thread execution is suspended and does not consume any CPU time until the condition variable is notified. The mutex lock must be locked by the calling thread on entrance to wait. Before returning to the calling thread, wait re-acquires the mutex lock. This function should always be called within a while loop that checks the condition.

Definition at line 249 of file OW_Condition.cpp.

References OW_NAMESPACE::NonRecursiveMutexLock::isLocked(), and OW_THROW.

Referenced by OW_NAMESPACE::IndicationServerImplThread::run(), OW_NAMESPACE::Semaphore::wait(), and OW_NAMESPACE::CppProviderIFC::CppProviderInitializationHelper::waitUntilInitialized().


Member Data Documentation

ConditionVar_t OW_NAMESPACE::Condition::m_condition [private]
 

Definition at line 85 of file OW_Condition.hpp.

Referenced by Condition(), doTimedWait(), doWait(), notifyAll(), notifyOne(), and ~Condition().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:13:33 2006 for openwbem by  doxygen 1.4.6