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:
Niranjhana N 2018-08-23 13:27:42 +05:30 committed by Anas Nashif
parent dc537eb6a9
commit 845fdbb7c0

View File

@ -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;
}
/**