sipxportlib
Version 3.3
|
Mutual exclusion semaphore (mutex) More...
#include <OsMutex.h>
Public Types | |
enum | MutexOptions { Q_FIFO = 0x0, Q_PRIORITY = 0x1, DELETE_SAFE = 0x4, INVERSION_SAFE = 0x8 } |
Public Member Functions | |
virtual OsStatus | acquire (const OsTime &rTimeout=OsTime::OS_INFINITY)=0 |
Block the task until the mutex is acquired or the timeout expires. More... | |
virtual OsStatus | tryAcquire (void)=0 |
Conditionally acquire the mutex (i.e., don't block) More... | |
virtual OsStatus | release (void)=0 |
Release the mutex. More... | |
virtual void | OsMutexShow (void)=0 |
Print mutex information to the console. More... | |
Public Member Functions inherited from OsSyncBase | |
virtual | ~OsSyncBase () |
Destructor. More... | |
OsSyncBase & | operator= (const OsSyncBase &rhs) |
Assignment operator. More... | |
Protected Member Functions | |
OsMutexBase () | |
Default constructor. More... | |
virtual | ~OsMutexBase () |
Destructor. More... | |
Protected Member Functions inherited from OsSyncBase | |
OsSyncBase () | |
Default constructor. More... | |
Mutual exclusion semaphore (mutex)
The mutual-exclusion semaphore is a specialized version of the binary semaphore, designed to address issues inherent in mutual exclusion, such as recursive access to resources, priority inversion, and deletion safety.
The fundamental behavior of the mutual-exclusion semaphore is identical to that of a binary semaphore except for^
enum MutexOptions |
|
inlineprotected |
Default constructor.
|
inlineprotectedvirtual |
Destructor.
|
pure virtual |
Block the task until the mutex is acquired or the timeout expires.
Implements OsSyncBase.
Implemented in OsMutexWnt, and OsMutexLinux.
|
pure virtual |
Conditionally acquire the mutex (i.e., don't block)
Implements OsSyncBase.
Implemented in OsMutexWnt, and OsMutexLinux.
|
pure virtual |
Release the mutex.
Implements OsSyncBase.
Implemented in OsMutexWnt, and OsMutexLinux.
|
pure virtual |
Print mutex information to the console.
Implemented in OsMutexWnt, and OsMutexLinux.