Mutex improvements #90
|
@ -1,7 +1,8 @@
|
|||
#include "Mutex.h"
|
||||
#include <framework/serviceinterface/ServiceInterfaceStream.h>
|
||||
|
||||
const uint32_t MutexIF::NO_TIMEOUT = RTEMS_NO_TIMEOUT;
|
||||
const uint32_t MutexIF::BLOCKING = RTEMS_NO_TIMEOUT;
|
||||
|
||||
const uint32_t MutexIF::POLLING = RTEMS_NO_WAIT;
|
||||
uint8_t Mutex::count = 0;
|
||||
|
||||
Mutex::Mutex() :
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef OS_RTEMS_MUTEX_H_
|
||||
#define OS_RTEMS_MUTEX_H_
|
||||
#ifndef FRAMEWORK_OSAL_RTEMS_MUTEX_H_
|
||||
#define FRAMEWORK_OSAL_RTEMS_MUTEX_H_
|
||||
|
||||
#include <framework/ipc/MutexIF.h>
|
||||
#include "RtemsBasic.h"
|
||||
|
|
Loading…
Reference in New Issue
Block a user
Looked through the RTEMS interface and unfortunately this is not correct.
RTEMS_NO_TIMEOUT is only the variable used for the TIMEOUT itself.
The RTEMS rtems_semaphore_obtain uses two different parameters:
Our implementation of lockMutex takes a Timeout. If set to zero this could mean "Lock forever" or "Poll". If we check the value against "MutexIF::POLLING" and "MutexIF::BLOCKING" it is still not clear how long the mutex should be BLOCKING.
I changed it again. But I don't know what rtems_interval is (is it milliseconds)?
I also don't know what the numerical values of those RTEMS constants are so maybe
the implementatio ndoes not work like that.
Hm WAIT is 0 and NO_WAIT is 1. So you can not request a 1 ms wait.