![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
Link-time delegating Mutex implementation. More...
#include <Os/DelegateMutex.hpp>
Public Member Functions | |
| DelegateMutex () | |
| Constructor. Mutex is unlocked when created. More... | |
| ~DelegateMutex () final | |
| Destructor. More... | |
| DelegateMutex (const DelegateMutex &other)=delete | |
| copy constructor is forbidden More... | |
| DelegateMutex & | operator= (const DelegateMutex &other)=delete |
| assignment operator is forbidden More... | |
| MutexHandle * | getHandle () override |
| return the underlying mutex handle (implementation specific) More... | |
| Status | take () override |
| lock the mutex and get return status More... | |
| Status | release () override |
| unlock the mutex and get return status More... | |
Public Member Functions inherited from Os::MutexInterface | |
| MutexInterface ()=default | |
| default constructor More... | |
| virtual | ~MutexInterface ()=default |
| default virtual destructor More... | |
| MutexInterface (const MutexInterface &other)=delete | |
| copy constructor is forbidden More... | |
| MutexInterface (const MutexInterface *other)=delete | |
| copy constructor is forbidden More... | |
| MutexInterface & | operator= (const MutexInterface &other)=delete |
| assignment operator is forbidden More... | |
| void | lock () |
| lock the mutex and assert success More... | |
| void | unLock () |
| unlock the mutex and assert success More... | |
| void | unlock () |
| alias for unLock to meet BasicLockable requirements More... | |
Additional Inherited Members | |
Public Types inherited from Os::MutexInterface | |
| enum | Status { OP_OK, ERROR_BUSY, ERROR_DEADLOCK, NOT_SUPPORTED, ERROR_OTHER } |
Static Public Member Functions inherited from Os::MutexInterface | |
| static MutexInterface * | getDelegate (MutexHandleStorage &aligned_new_memory) |
| provide a pointer to a Mutex delegate object More... | |
Link-time delegating Mutex implementation.
Stores an implementation-defined mutex handle in a byte array and forwards all operations to a delegate constructed (via placement-new) by MutexInterface::getDelegate(). Which getDelegate() is linked selects the concrete implementation at link time. This is the default binding of the Os::Mutex alias; platforms may instead alias Os::Mutex directly to a concrete implementation for compile-time selection (see config/OsDelegateMutex.hpp).
Definition at line 19 of file DelegateMutex.hpp.
| Os::DelegateMutex::DelegateMutex | ( | ) |
Constructor. Mutex is unlocked when created.
Definition at line 14 of file DelegateMutex.cpp.
|
final |
Destructor.
Definition at line 19 of file DelegateMutex.cpp.
|
delete |
copy constructor is forbidden
|
overridevirtual |
return the underlying mutex handle (implementation specific)
Implements Os::MutexInterface.
Definition at line 24 of file DelegateMutex.cpp.
|
delete |
assignment operator is forbidden
|
overridevirtual |
unlock the mutex and get return status
Implements Os::MutexInterface.
Definition at line 34 of file DelegateMutex.cpp.
|
overridevirtual |
lock the mutex and get return status
Implements Os::MutexInterface.
Definition at line 29 of file DelegateMutex.cpp.