INOS
CINOSSync Class Reference
Inheritance diagram for CINOSSync:

Public Member Functions

 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
 

Protected Member Functions

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

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 CINOSKernel
 
class CINOSScheduler
 
class CINOSTask
 
class CINOSMultiSync
 

Constructor & Destructor Documentation

◆ CINOSSync()

CINOSSync::CINOSSync ( const char aName = 0,
uint32  aInitialCount = 0,
bool  aManual = false 
)
Parameters
aNameName of the sync object. Useful for debugging purposes, e.g. it may help to identify a sync object when using a debugger.
aInitialCountThe initial 'signal' count.
aManualif false (the default), wake up only one task at a time. If true, then all waiting tasks (and CINOSMultiSync objects) will be woken up)

Member Function Documentation

◆ GetName()

virtual const char * CINOSSync::GetName ( )
inlinevirtual

Get name of sync object.

Reimplemented in CINOSBitSetEvent, and CINOSBitClearedEvent.

◆ MsgEvent()

virtual bool CINOSSync::MsgEvent ( CINOSTaskExMsg apMsg)
inlinevirtual

Put an event message to the sync object. The base implementation ignores the message and returns false.

Parameters
apMsgthe original message of this call.
auFlags

Reimplemented in CINOSMcSyncEvent.

◆ Reset()

virtual void CINOSSync::Reset ( )
virtual

Reset object state.

Reimplemented in CINOSMultiSync, CINOSBitSetEvent, and CINOSBitClearedEvent.

◆ Signal()

virtual void CINOSSync::Signal ( )
inlinevirtual

Put object into the signaled state.

Reimplemented in CINOSMcRobotSync, CINOSMcSync, CINOSMcSyncMsg, CINOSBitSetEvent, and CINOSBitClearedEvent.

◆ SignalAndUnlock()

void CINOSSync::SignalAndUnlock ( uint32  auMsr)
inlineprotected

Put object into the signaled state and release the core lock.

Parameters
auMsrthe return value of the previous INOSCoreLock() on the semaphore's m_Lock. Intended to be used by subclasses only, e.g. CINOSSemaphore::Release

◆ SignalEx()

virtual void CINOSSync::SignalEx ( CINOSTaskExMsg apMsg,
uint32  auRplId,
uint32  auAppError 
)
inlinevirtual

Put object into the signaled state with CINOSTaskExMsg and reply information. default behaviour is the same as signal.

Parameters
apMsgthe original message of this call.
auRplIdreply id code.
auAppErrorapplication error code.

Reimplemented in CINOSMcRobotInitSync.

◆ Wait()

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

wait for signaled state for max. aTimeout usec

Parameters
auTimeoutmax. time to wait for the signaled state or forever if used INOS_WAIT_FOREVER. The unit of the time is [usec] (microseconds). Set auTimeout == 100000 for example if you want to wait for max. 100ms

Reimplemented in CINOSMultiSync, CINOSBitSetEvent, and CINOSBitClearedEvent.


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