INOS
CINOSConditionVariable Class Reference

#include <inos_syn.h>

Inheritance diagram for CINOSConditionVariable:

Public Types

enum  EStatus { eNoTimeout , eTimeout }
 

Public Member Functions

 CINOSConditionVariable (const char *aName=nullptr)
 
virtual ~CINOSConditionVariable ()
 Destroy condition variable object.
 
template<class Rep , class Period >
EStatus WaitFor (std::unique_lock< CINOSMutex > &lock, const std::chrono::duration< Rep, Period > &rel_time)
 wait for being notified waiting at most aTimeout. See http://en.cppreference.com/w/cpp/thread/condition_variable/wait_for for more information
 
template<class Rep , class Period , class Predicate >
bool WaitFor (std::unique_lock< CINOSMutex > &lock, const std::chrono::duration< Rep, Period > &rel_time, Predicate pred)
 wait for being notified waiting at most aTimeout. See http://en.cppreference.com/w/cpp/thread/condition_variable/wait_for for more information
 
void Wait (std::unique_lock< CINOSMutex > &lock)
 wait for being notified (even spuriously) See http://en.cppreference.com/w/cpp/thread/condition_variable/wait for more information
 
template<class Predicate >
void wait (std::unique_lock< CINOSMutex > &lock, Predicate pred)
 wait for being notified and 'pred' is true See http://en.cppreference.com/w/cpp/thread/condition_variable/wait for more information
 
void NotifyOne ()
 Wake up one waiting task See http://en.cppreference.com/w/cpp/thread/condition_variable/notify_one for more information.
 
void NotifyAll ()
 Wake up all waiting tasks See http://en.cppreference.com/w/cpp/thread/condition_variable/notify_all for more information.
 
- Public Member Functions inherited from CINOSSync
 CINOSSync (const char *aName=0, uint32 aInitialCount=0, bool aManual=false)
 
virtual ~CINOSSync ()
 Destroy sync object.
 
virtual const charGetName ()
 Get name of sync object.
 
virtual uint32 Wait (uint32 aTimeout=0xFFFFFFFF)
 wait for signaled state for max. aTimeout usec
 
virtual void Signal ()
 Put object into the signaled state.
 
virtual void SignalEx (CINOSTaskExMsg *apMsg, uint32 auRplId, uint32 auAppError)
 
virtual bool MsgEvent (CINOSTaskExMsg *apMsg)
 
virtual void Reset ()
 Reset object state.
 
volatile uint32 * GetLockAdr ()
 Return pointer to core locking structure.
 
virtual bool UsesPolling () const
 
bool IsSame (CINOSSync *i_pSync)
 
int operator< (const CINOSSync &aSync) const
 
int operator== (const CINOSSync &aSync) const
 
int operator< (const char *aName) const
 
int operator== (const char *aName) const
 

Additional Inherited Members

- Protected Member Functions inherited from CINOSSync
virtual bool Signaled (CINOSSync *&aChild)
 
virtual CINOSSyncNode * GetNode ()
 
virtual void SetNode (CINOSSyncNode *aNode)
 
void SignalAndUnlock (uint32 auMsr)
 Put object into the signaled state and release the core lock.
 
- Protected Attributes inherited from CINOSSync
const charm_pName
 name of sync object
 
uint32 m_uCount
 signaled count of object
 
bool m_bManual
 manual object yes/no
 
tTaskId m_idFstWaiting
 id of first task waiting for the sync object
 
tTaskId m_idLstWaiting
 id of last task waiting for the sync object
 
SINOSCoreLock m_Lock
 core lock
 
CINOSSyncNode * m_pNode
 pointer to object node (if any)
 

Detailed Description

Condition variable that mimics the API of the C++11 condition variable. The behavior should equal the one from C++11, therefore, documentation for it can be read at http://en.cppreference.com/w/cpp/thread/condition_variable. Note that 'wait_until' is so far missing.

Constructor & Destructor Documentation

◆ CINOSConditionVariable()

CINOSConditionVariable::CINOSConditionVariable ( const char aName = nullptr)
Parameters
aNameName of the codnition variable object. Useful for debugging purposes

The documentation for this class was generated from the following file: