sipxportlib  Version 3.3
Public Member Functions | List of all members
OsCSemLinux Class Reference

#include <OsCSemLinux.h>

Inheritance diagram for OsCSemLinux:
Inheritance graph
[legend]
Collaboration diagram for OsCSemLinux:
Collaboration graph
[legend]

Public Member Functions

 OsCSemLinux (const int queueOptions, const int maxCount)
 
 OsCSemLinux (const int queueOptions, const int maxCount, const int initCount)
 
virtual ~OsCSemLinux ()
 
virtual OsStatus acquire (const OsTime &rTimeout=OsTime::OS_INFINITY)
 Block the task until the semaphore is acquired or the timeout expires. More...
 
virtual OsStatus tryAcquire (void)
 Conditionally acquire the semaphore (i.e., don't block) More...
 
virtual OsStatus release (void)
 Release the semaphore. More...
 
- Public Member Functions inherited from OsSyncBase
virtual ~OsSyncBase ()
 Destructor. More...
 
OsSyncBaseoperator= (const OsSyncBase &rhs)
 Assignment operator. More...
 

Additional Inherited Members

- Public Types inherited from OsCSemBase
enum  QueueOptions { Q_FIFO = 0x0, Q_PRIORITY = 0x1 }
 
- Protected Member Functions inherited from OsCSemBase
 OsCSemBase (const int queueOptions, const int maxCount, const int initCount)
 Default constructor. More...
 
virtual ~OsCSemBase ()
 Destructor. More...
 
- Protected Member Functions inherited from OsSyncBase
 OsSyncBase ()
 Default constructor. More...
 

Constructor & Destructor Documentation

OsCSemLinux ( const int  queueOptions,
const int  maxCount 
)
OsCSemLinux ( const int  queueOptions,
const int  maxCount,
const int  initCount 
)
~OsCSemLinux ( )
virtual

Member Function Documentation

OsStatus acquire ( const OsTime rTimeout = OsTime::OS_INFINITY)
virtual

Block the task until the semaphore is acquired or the timeout expires.

Implements OsCSemBase.

OsStatus tryAcquire ( void  )
virtual

Conditionally acquire the semaphore (i.e., don't block)

Implements OsCSemBase.

OsStatus release ( void  )
virtual

Release the semaphore.

Returns
OS_BUSY if the semaphore is held by some other task.

Implements OsCSemBase.