semaphore: Simplify task_sem_take() API family

Changes the semaphore API so that the timeout parameter must be specified
when invoking task_sem_take() thereby obsoleting the following APIs:
	task_sem_take_wait()
	task_sem_take_wait_timeout()
	_task_sem_take()

Change-Id: I746d5c966a3b81ffe014333af51aa10ea8a63263
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
Peter Mitsis 2015-12-07 13:44:11 -05:00 committed by Anas Nashif
commit 40eba989e2
30 changed files with 139 additions and 163 deletions

View file

@ -141,7 +141,7 @@ static inline void synchronous_call_wait(device_sync_call_t *sync)
if ((sys_execution_context_type_get() == NANO_CTX_TASK) &&
(task_priority_get() < CONFIG_NUM_TASK_PRIORITIES - 1)) {
sync->caller_is_task = true;
task_sem_take_wait(sync->t_sem);
task_sem_take(sync->t_sem, TICKS_UNLIMITED);
} else {
sync->caller_is_task = false;
nano_sem_take_wait(&sync->f_sem);