F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
Mutex.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title Os/Stub/Mutex.hpp
3// \brief stub definitions for Os::Mutex
4// ======================================================================
5#include "Os/Mutex.hpp"
6
7#ifndef OS_STUB_MUTEX_HPP
8#define OS_STUB_MUTEX_HPP
9namespace Os {
10namespace Stub {
11namespace Mutex {
12
13struct StubMutexHandle : public MutexHandle {};
14
19class StubMutex : public MutexInterface {
20 public:
23 StubMutex() = default;
24
27 ~StubMutex() override = default;
28
31 MutexHandle* getHandle() override;
32
33 Status take() override;
34 Status release() override;
35
36 private:
38 StubMutexHandle m_handle;
39};
40
41} // namespace Mutex
42} // namespace Stub
43} // namespace Os
44#endif // OS_STUB_MUTEX_HPP
stub implementation of Os::Mutex
Definition Mutex.hpp:19
MutexHandle * getHandle() override
return the underlying mutex handle (implementation specific)
Definition Mutex.cpp:19
Status release() override
unlock the mutex and get return status
Definition Mutex.cpp:15
StubMutex()=default
constructor
~StubMutex() override=default
destructor
Status take() override
lock the mutex and get return status
Definition Mutex.cpp:11