lib: cmsis_rtos_v1: replace an else case
Replace an else-if case in osSemaphoreWait with else to account for both EBUSY and EAGAIN return values from k_sem_take. The return value would be 0 for osSemaphoreWait in both cases. Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
This commit is contained in:
parent
dc537eb6a9
commit
845fdbb7c0
@ -68,11 +68,9 @@ int32_t osSemaphoreWait(osSemaphoreId semaphore_id, uint32_t timeout)
|
||||
*/
|
||||
if (status == 0) {
|
||||
return k_sem_count_get(semaphore) + 1;
|
||||
} else if (status == -EAGAIN) {
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user