Simplified XF 1.1.0
|
Mutex interface needed by the XF to access a mutex. More...
#include <mutex.h>
Public Member Functions | |
virtual void | lock ()=0 |
Blocks until the mutex becomes available. More... | |
virtual void | unlock ()=0 |
Releases the mutex so it can be taken by other threads. More... | |
virtual bool | tryLock (int32_t timeout=0)=0 |
Tries to get the mutex. More... | |
Static Public Member Functions | |
static XFMutex * | create () |
Creates and returns a new mutex instance. More... | |
Mutex interface needed by the XF to access a mutex.
This interface only needs to be implemented for an XF port using an underlying OS. An IDF based XF does not need to provide a mutex.
A non-recursive mutex needs to be implemented.
|
static |
Creates and returns a new mutex instance.
Implementation of interface::XFMutex::create method.
The implementation of this method needs to be provided by every XF port realizing a Mutex with this XFMutex interface. Best way is to implement this method in the mutex.cpp (or mutex-default.cpp) file of the XF port.
Attention: Do not forget to create an object of the class realizing the interface and then return this object.
You cannot instanciate an object of an abstract class!
|
pure virtual |
|
pure virtual |
|
pure virtual |