INOS
CINOSSemaphore Class Reference
Inheritance diagram for CINOSSemaphore:

Public Member Functions

 CINOSSemaphore (const char *apName=0, uint32 auInitialCount=1, uint32 auMaxCount=0xffffffff)
 Create a semaphore with the given name. See also Semaphore.
 
virtual ~CINOSSemaphore ()
 Destroy semaphore.
 
uint32 Request (uint32 aTimeout=0xFFFFFFFF)
 Wait for semaphore for a max. amount of time.
 
void Release ()
 Release seamphore.
 
uint32 GetCount ()
 Get current count.
 
uint32 GetMaxCount ()
 Get max. allowed count.
 
- 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)
 

Constructor & Destructor Documentation

◆ CINOSSemaphore()

CINOSSemaphore::CINOSSemaphore ( const char apName = 0,
uint32  auInitialCount = 1,
uint32  auMaxCount = 0xffffffff 
)

Create a semaphore with the given name. See also Semaphore.

Parameters
apNameName of semaphore
auInitialCountRequested initial count
auMaxCountRequested maximal count count

Member Function Documentation

◆ Request()

uint32 CINOSSemaphore::Request ( uint32  aTimeout = 0xFFFFFFFF)

Wait for semaphore for a max. amount of time.

Parameters
auTimeoutmax. time to wait for the semaphore 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

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