Mutex improvements #90

Merged
gaisser merged 22 commits from KSat/fsfw:mueller_MutexImprovements into master 2020-08-25 12:13:30 +02:00
2 changed files with 9 additions and 2 deletions
Showing only changes of commit 2eba865564 - Show all commits

View File

@ -10,11 +10,11 @@ public:
internalMutex(mutex) {
ReturnValue_t status = mutex->lockMutex(timeoutMs);
if(status != HasReturnvaluesIF::RETURN_OK){
sif::error << "MutexHelper: Lock of Mutex failed " << status << std::endl;
sif::error << "MutexHelper: Lock of Mutex failed " <<
status << std::endl;
}
}
~MutexHelper() {
internalMutex->unlockMutex();
}

View File

@ -3,6 +3,13 @@
#include <framework/returnvalues/HasReturnvaluesIF.h>
/**
* @brief Common interface for OS Mutex objects which provide MUTual EXclusion.
*
* @details https://en.wikipedia.org/wiki/Lock_(computer_science)
* @ingroup osal
* @ingroup interface
*/
class MutexIF {
public:
static const uint32_t NO_TIMEOUT; //!< Needs to be defined in implementation.