made rtems adaption
This commit is contained in:
parent
1b8f134029
commit
a4626aeac0
@ -25,12 +25,13 @@ Mutex::~Mutex() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Mutex::lockMutex(uint32_t timeoutMs) {
|
ReturnValue_t Mutex::lockMutex(TimeoutType timeoutType =
|
||||||
if(timeoutMs == MutexIF::BLOCKING) {
|
TimeoutType::BLOCKING, uint32_t timeoutMs) {
|
||||||
|
if(timeoutMs == MutexIF::TimeoutType::BLOCKING) {
|
||||||
rtems_status_code status = rtems_semaphore_obtain(mutexId,
|
rtems_status_code status = rtems_semaphore_obtain(mutexId,
|
||||||
RTEMS_WAIT, timeoutMs);
|
RTEMS_WAIT, timeoutMs);
|
||||||
}
|
}
|
||||||
else if(timeoutMs == MutexIF::POLLING) {
|
else if(timeoutMs == MutexIF::TimeoutType::POLLING) {
|
||||||
timeoutMs = RTEMS_NO_TIMEOUT;
|
timeoutMs = RTEMS_NO_TIMEOUT;
|
||||||
rtems_status_code status = rtems_semaphore_obtain(mutexId,
|
rtems_status_code status = rtems_semaphore_obtain(mutexId,
|
||||||
RTEMS_NO_WAIT, timeoutMs);
|
RTEMS_NO_WAIT, timeoutMs);
|
||||||
|
Loading…
Reference in New Issue
Block a user