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

#include <OsBSemLinux.h>

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

Public Member Functions

 OsBSemLinux (const int queueOptions, const int initState)
 
virtual ~OsBSemLinux ()
 
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...
 
virtual void OsBSemShow (void)
 Print semaphore information to the console. 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 OsBSemBase
enum  InitialSemaphoreState { EMPTY = 0, FULL = 1 }
 
enum  QueueOptions { Q_FIFO = 0x0, Q_PRIORITY = 0x1 }
 
- Protected Member Functions inherited from OsBSemBase
 OsBSemBase ()
 Default constructor. More...
 
virtual ~OsBSemBase ()
 Destructor. More...
 
- Protected Member Functions inherited from OsSyncBase
 OsSyncBase ()
 Default constructor. More...
 
- Protected Attributes inherited from OsBSemBase
int mOptions
 options specified at time of binary semaphore creation More...
 
int mTaskId
 if OS_SYNC_DEBUG is enabled, ONLY ON WNT, we use this < variable to store the ID of the task currently holding the semaphore More...
 

Constructor & Destructor Documentation

OsBSemLinux ( const int  queueOptions,
const int  initState 
)
~OsBSemLinux ( )
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 OsBSemBase.

OsStatus tryAcquire ( void  )
virtual

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

Implements OsBSemBase.

OsStatus release ( void  )
virtual

Release the semaphore.

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

Implements OsBSemBase.

void OsBSemShow ( void  )
virtual

Print semaphore information to the console.

Implements OsBSemBase.