nano_sema: Simplify nano_xxx_sem_take() API family

Changes the nanokernel semaphore API so that the timeout parameter must be
specified when invoking nano_isr_sem_take(), nano_fiber_sem_take(),
nano_task_sem_take() and nano_sem_take().

This obsoletes the following APIs:
	nano_fiber_sem_take_wait()
	nano_fiber_sem_take_wait_timeout()
	nano_task_sem_take_wait()
	nano_task_sem_take_wait_timeout()
	nano_sem_take_wait()
	nano_sem_take_wait_timeout()

Change-Id: If7a4bce1bd8ec8d6410d04f3c16ff1922ff0910e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
Peter Mitsis 2015-12-18 15:36:34 -05:00 committed by Anas Nashif
commit 54b782a88b
39 changed files with 199 additions and 378 deletions

View file

@ -144,7 +144,7 @@ static inline void synchronous_call_wait(device_sync_call_t *sync)
task_sem_take(sync->t_sem, TICKS_UNLIMITED);
} else {
sync->caller_is_task = false;
nano_sem_take_wait(&sync->f_sem);
nano_sem_take(&sync->f_sem, TICKS_NONE);
}
}
@ -174,7 +174,7 @@ static inline void synchronous_call_complete(device_sync_call_t *sync)
*/
static inline void synchronous_call_wait(device_sync_call_t *sync)
{
nano_sem_take_wait(&sync->f_sem);
nano_sem_take(&sync->f_sem, TICKS_UNLIMITED);
}
/**