sipxportlib  Version 3.3
Public Member Functions | Protected Member Functions | List of all members
OsSyncBase Class Referenceabstract

Base class for the synchronization mechanisms in the OS abstraction layer. More...

#include <OsSyncBase.h>

Inheritance diagram for OsSyncBase:
Inheritance graph
[legend]

Public Member Functions

virtual ~OsSyncBase ()
 Destructor. More...
 
OsSyncBaseoperator= (const OsSyncBase &rhs)
 Assignment operator. More...
 
virtual OsStatus acquire (const OsTime &rTimeout=OsTime::OS_INFINITY)=0
 Block until the sync object is acquired or the timeout expires. More...
 
virtual OsStatus tryAcquire (void)=0
 Conditionally acquire the semaphore (i.e., don't block) More...
 
virtual OsStatus release (void)=0
 Release the sync object. More...
 

Protected Member Functions

 OsSyncBase ()
 Default constructor. More...
 

Detailed Description

Base class for the synchronization mechanisms in the OS abstraction layer.

Constructor & Destructor Documentation

virtual ~OsSyncBase ( )
inlinevirtual

Destructor.

OsSyncBase ( )
inlineprotected

Default constructor.

Member Function Documentation

OsSyncBase& operator= ( const OsSyncBase rhs)

Assignment operator.

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

Block until the sync object is acquired or the timeout expires.

Implemented in OsMutexBase, OsCSemBase, OsMutexWnt, OsBSemBase, OsMutexLinux, OsCSemWnt, OsCSemLinux, OsBSemWnt, and OsBSemLinux.

virtual OsStatus tryAcquire ( void  )
pure virtual

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

Implemented in OsMutexBase, OsCSemBase, OsMutexWnt, OsBSemBase, OsMutexLinux, OsCSemWnt, OsCSemLinux, OsBSemWnt, and OsBSemLinux.

virtual OsStatus release ( void  )
pure virtual

Release the sync object.

Returns
OS_BUSY if the sync object is held by some other task.

Implemented in OsMutexBase, OsCSemBase, OsBSemBase, OsMutexWnt, OsMutexLinux, OsCSemWnt, OsCSemLinux, OsBSemWnt, and OsBSemLinux.