F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Os::MutexCommon< T > Class Template Reference

Os::Mutex wrapper around the implementation T selected at compile time. More...

#include <Os/Mutex.hpp>

Inheritance diagram for Os::MutexCommon< T >:
Os::MutexUserInterface

Public Member Functions

 MutexCommon ()=default
 Constructor. Mutex is unlocked when created. More...
 
 ~MutexCommon ()=default
 Destructor. More...
 
 MutexCommon (const MutexCommon &other)=delete
 copy constructor is forbidden More...
 
MutexCommon & operator= (const MutexCommon &other)=delete
 assignment operator is forbidden More...
 
MutexHandle * getHandle ()
 return the underlying mutex handle (implementation specific) More...
 
Status take ()
 lock the mutex and get return status More...
 
Status release ()
 unlock the mutex and get return status 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::MutexUserInterface
enum  Status {
  OP_OK, ERROR_BUSY, ERROR_DEADLOCK, NOT_SUPPORTED,
  ERROR_OTHER
}
 

Detailed Description

template<typename T>
class Os::MutexCommon< T >

Os::Mutex wrapper around the implementation T selected at compile time.

Holds the implementation by value and forwards every operation to it. Os::Mutex is this class instantiated on the implementation selected in config/MutexSelection.hpp.

Definition at line 20 of file Mutex.hpp.

Constructor & Destructor Documentation

◆ MutexCommon() [1/2]

template<typename T>
Os::MutexCommon< T >::MutexCommon ( )
default

Constructor. Mutex is unlocked when created.

◆ ~MutexCommon()

template<typename T>
Os::MutexCommon< T >::~MutexCommon ( )
default

Destructor.

◆ MutexCommon() [2/2]

template<typename T>
Os::MutexCommon< T >::MutexCommon ( const MutexCommon< T > &  other)
delete

copy constructor is forbidden

Member Function Documentation

◆ getHandle()

template<typename T >
MutexHandle * Os::MutexCommon< T >::getHandle ( )

return the underlying mutex handle (implementation specific)

Returns
internal mutex handle representation

Definition at line 105 of file Mutex.hpp.

◆ lock()

template<typename T >
void Os::MutexCommon< T >::lock ( )

lock the mutex and assert success

Definition at line 120 of file Mutex.hpp.

◆ operator=()

template<typename T>
MutexCommon& Os::MutexCommon< T >::operator= ( const MutexCommon< T > &  other)
delete

assignment operator is forbidden

◆ release()

template<typename T >
MutexCommon< T >::Status Os::MutexCommon< T >::release ( )

unlock the mutex and get return status

Definition at line 115 of file Mutex.hpp.

◆ take()

template<typename T >
MutexCommon< T >::Status Os::MutexCommon< T >::take ( )

lock the mutex and get return status

Definition at line 110 of file Mutex.hpp.

◆ unLock()

template<typename T >
void Os::MutexCommon< T >::unLock ( )

unlock the mutex and assert success

Definition at line 127 of file Mutex.hpp.

◆ unlock()

template<typename T >
void Os::MutexCommon< T >::unlock ( )

alias for unLock to meet BasicLockable requirements

Definition at line 134 of file Mutex.hpp.


The documentation for this class was generated from the following file: