CppELib 1.7.0
|
Abstract class that has functions of common RTOS's mutex. More...
#include <Mutex.h>
Public Member Functions | |
virtual Error | lock ()=0 |
Block the current thread until locks this mutex. | |
virtual Error | tryLock ()=0 |
Try to lock this mutex without blocking. | |
virtual Error | timedLock (Timeout tmout)=0 |
Block the current thread until locks this mutex but only within the limited time. | |
virtual Error | unlock ()=0 |
Unlock this mutex that the current thread locks. | |
Static Public Member Functions | |
static Mutex * | create () |
Create a Mutex object. | |
static Mutex * | create (int priorityCeiling) |
Create a Mutex object with priority ceiling protocol. | |
static void | destroy (Mutex *m) |
Destroy a Mutex object. | |
Protected Member Functions | |
virtual | ~Mutex () |
Abstract class that has functions of common RTOS's mutex.
|
inlineprotectedvirtual |
|
static |
|
static |
|
static |
Destroy a Mutex object.
m | Pointer of Mutex object created by Mutex::create() |
|
pure virtual |
Block the current thread until locks this mutex.
OK | Success. The current thread locked this mutex |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
Implemented in StdCppOSWrapper::StdCppMutex, and TestDoubleOSWrapper::TestDoubleMutex.
Block the current thread until locks this mutex but only within the limited time.
tmout | The limited time |
OK | Success. The current thread locked this mutex |
TimedOut | The limited time was elapsed |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
Implemented in StdCppOSWrapper::StdCppMutex, and TestDoubleOSWrapper::TestDoubleMutex.
|
pure virtual |
Try to lock this mutex without blocking.
OK | Success. The current thread locked this mutex |
TimedOut | Failed. Other thread already locked this mutex |
Implemented in StdCppOSWrapper::StdCppMutex, and TestDoubleOSWrapper::TestDoubleMutex.
|
pure virtual |
Unlock this mutex that the current thread locks.
OK | Success. The current thread unlocked this mutex |
NotLocked | The current thread has not locked this mutex |
Implemented in StdCppOSWrapper::StdCppMutex, and TestDoubleOSWrapper::TestDoubleMutex.