INOS
CINOSMultiSync Class Reference

#include <inos_syn.h>

Inheritance diagram for CINOSMultiSync:

Public Member Functions

 CINOSMultiSync (const char *aName=0)
 
void Or (CINOSSync *aChild)
 
void And (CINOSSync *aChild)
 
void Remove (CINOSSync *aChild, bool aDelete=false)
 
void RemoveAll (bool aDelete=false)
 
virtual uint32 Wait (uint32 aTimeout=0xFFFFFFFF)
 
virtual uint32 Wait (CINOSSync *&aChild, uint32 aTimeout=0xFFFFFFFF)
 
virtual void Reset ()
 
virtual bool UsesPolling () const
 
CINOSBusGetBus ()
 
void SetBus (CINOSBus *apBus)
 
- 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 void Signal ()
 Put object into the signaled state.
 
virtual void SignalEx (CINOSTaskExMsg *apMsg, uint32 auRplId, uint32 auAppError)
 
virtual bool MsgEvent (CINOSTaskExMsg *apMsg)
 
volatile uint32 * GetLockAdr ()
 Return pointer to core locking structure.
 
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
 

Protected Member Functions

virtual bool Signaled (CINOSSync *&aChild)
 
void WakeUp ()
 
void Cleanup ()
 
 DECLARE_DYNAMIC (CINOSMultiSync)
 
- Protected Member Functions inherited from CINOSSync
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

CINOSSyncNode * pFirstChild
 
CINOSSyncNode * pLastChild
 
CINOSExceptionCleanuppCleanup
 
bool m_bUsesPolling
 
CINOSBusm_pBus
 
- 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)
 

Friends

class CINOSSyncNode
 

Detailed Description

Wait for 1..n CINOSSync objects to become signaled. Each CINOSSync object can either be waited for 'or' or 'and'. All 'and' objects needs to be signaled in order for a 'multisync' to become signaled, while only one of the 'or' objects needs to become signaled.

The 'management' function (Add, Or, Remove, ...) of this class's objects of this class are not thread-safe, means that they are intended to be used by one task only. The Wait function, on the other hand, are thread-safe. Therefore, multiple tasks could be waiting for the same mutlisync object.

Note that with INOS_KERNEL, some seldom used features have been dropped to reduce complexity. Therefore, the following limiations exist:

Member Function Documentation

◆ And()

void CINOSMultiSync::And ( CINOSSync aChild)

add an 'and' child to the list of children (not reentrant, means: only one task is allowed to call that function at a time)

◆ GetBus()

CINOSBus * CINOSMultiSync::GetBus ( )
inline

get/set bus used for bus sleep when polling (busy wait). if this is set to null, a relinquish is performed instead

◆ Or()

void CINOSMultiSync::Or ( CINOSSync aChild)

add an 'or' child to the list of children (not reentrant), means: only one task is allowed to call that function at a time)

◆ Remove()

void CINOSMultiSync::Remove ( CINOSSync aChild,
bool  aDelete = false 
)

remove child from the list of children (not reentrant, means: only one task is allowed to call that function at a time)

Parameters
aDeleteIf true, aChild will be deleted

◆ RemoveAll()

void CINOSMultiSync::RemoveAll ( bool  aDelete = false)

remove all children from the list of children (not reentrant, means: only one task is allowed to call that function at a time)

Parameters
aDeleteIf true, the CINOSSync* objects will be deleted

◆ Reset()

virtual void CINOSMultiSync::Reset ( )
virtual

reset object state: Iterates through all CINOSSync object which are part of this object and calls their 'Reset' function.

Reimplemented from CINOSSync.

◆ Signaled()

virtual bool CINOSMultiSync::Signaled ( CINOSSync *&  aChild)
protectedvirtual

Reimplemented from CINOSSync.

◆ UsesPolling()

virtual bool CINOSMultiSync::UsesPolling ( ) const
inlinevirtual

Reimplemented from CINOSSync.

◆ Wait() [1/2]

virtual uint32 CINOSMultiSync::Wait ( CINOSSync *&  aChild,
uint32  aTimeout = 0xFFFFFFFF 
)
virtual

wait for signaled state for max. aTimeout usec and return child that caused the signal (not reentrant, means: only one task is allowed to call that function at a time)

◆ Wait() [2/2]

virtual uint32 CINOSMultiSync::Wait ( uint32  aTimeout = 0xFFFFFFFF)
virtual

wait for signaled state for max. aTimeout usec (not reentrant, means: only one task is allowed to call that function at a time)

Reimplemented from CINOSSync.


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