linux: removed old static timeout values

This commit is contained in:
Robin Müller 2020-08-07 22:02:23 +02:00
parent 37f2539d89
commit e3d094b2de

View File

@ -2,8 +2,6 @@
#include <framework/serviceinterface/ServiceInterfaceStream.h>
#include <framework/timemanager/Clock.h>
const uint32_t MutexIF::BLOCKING = 0xffffffff;
const uint32_t MutexIF::POLLING = 0;
uint8_t Mutex::count = 0;
@ -61,22 +59,28 @@ ReturnValue_t Mutex::lockMutex(TimeoutType timeoutType, uint32_t timeoutMs) {
switch (status) {
case EINVAL:
//The mutex was created with the protocol attribute having the value PTHREAD_PRIO_PROTECT and the calling thread's priority is higher than the mutex's current priority ceiling.
// The mutex was created with the protocol attribute having the value
// PTHREAD_PRIO_PROTECT and the calling thread's priority is higher
// than the mutex's current priority ceiling.
return WRONG_ATTRIBUTE_SETTING;
//The process or thread would have blocked, and the abs_timeout parameter specified a nanoseconds field value less than zero or greater than or equal to 1000 million.
//The value specified by mutex does not refer to an initialized mutex object.
// The process or thread would have blocked, and the abs_timeout
// parameter specified a nanoseconds field value less than zero or
// greater than or equal to 1000 million.
// The value specified by mutex does not refer to an initialized mutex object.
//return MUTEX_NOT_FOUND;
case EBUSY:
//The mutex could not be acquired because it was already locked.
// The mutex could not be acquired because it was already locked.
return MUTEX_ALREADY_LOCKED;
case ETIMEDOUT:
//The mutex could not be locked before the specified timeout expired.
// The mutex could not be locked before the specified timeout expired.
return MUTEX_TIMEOUT;
case EAGAIN:
//The mutex could not be acquired because the maximum number of recursive locks for mutex has been exceeded.
// The mutex could not be acquired because the maximum number of
// recursive locks for mutex has been exceeded.
return MUTEX_MAX_LOCKS;
case EDEADLK:
//A deadlock condition was detected or the current thread already owns the mutex.
// A deadlock condition was detected or the current thread
// already owns the mutex.
return CURR_THREAD_ALREADY_OWNS_MUTEX;
case 0:
//Success