some minor form corrections

This commit is contained in:
Robin Müller 2020-05-29 14:03:39 +02:00
parent 8f563b7b21
commit 2eba865564
2 changed files with 9 additions and 2 deletions

View File

@ -10,11 +10,11 @@ public:
internalMutex(mutex) { internalMutex(mutex) {
ReturnValue_t status = mutex->lockMutex(timeoutMs); ReturnValue_t status = mutex->lockMutex(timeoutMs);
if(status != HasReturnvaluesIF::RETURN_OK){ 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() { ~MutexHelper() {
internalMutex->unlockMutex(); internalMutex->unlockMutex();
} }

View File

@ -3,6 +3,13 @@
#include <framework/returnvalues/HasReturnvaluesIF.h> #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 { class MutexIF {
public: public:
static const uint32_t NO_TIMEOUT; //!< Needs to be defined in implementation. static const uint32_t NO_TIMEOUT; //!< Needs to be defined in implementation.