extern void rt_sem_init
(SEM* sem, int value);
SYNOPSIS
#include "rtl_sched.h"
DESCRIPTION
Initializes a semaphore sem at the initial condition
given by value
RETURN VALUE
None
ERRORS
None
extern int rt_sem_delete
(SEM* sem);
SYNOPSIS
#include "rtl_sched.h"
DESCRIPTION
Deletes the semaphore sem and unblocks any task blocked
waiting for events.
RETURN VALUE
On success, 0 is returned. On failure, a negative value is
returned.
ERRORS
sem does not refer to a valid task (-EINVAL)
extern int rt_sem_signal
(SEM* sem);
SYNOPSIS
#include "rtl_sched.h"
DESCRIPTION
Signals that an event is available. This function does
not block the current task, and allows the task with higher priority
blocked on the semaphore waiting list to receive the available event.
RETURN VALUE
On success, 0 is returned. On failure, a negative value is
returned.
ERRORS
sem does not refer to a valid task (-EINVAL)
extern int rt_sem_wait
(SEM* sem);
SYNOPSIS
#include "rtl_sched.h"
DESCRIPTION
Waits for an event: if none is available, the process queues
up in priority order.
RETURN VALUE
On success, 0 is returned. On failure, a negative value is
returned.
ERRORS
sem does not refer to a valid task (-EINVAL)
extern int rt_sem_wait_if
(SEM* sem);
SYNOPSIS
#include "rtl_sched.h"
DESCRIPTION
Waits for an event, if none is available, returns immediately.
RETURN VALUE
On success, 0 is returned. On failure, a negative value is
returned.
ERRORS
sem does not refer to a valid task (-EINVAL)
extern int rt_sem_wait_until
(SEM* sem, RTIME time);
SYNOPSIS
#include "rtl_sched.h"
DESCRIPTION
Waits for an event: if none is available, the process is
blocked in priority order on the semaphore waiting list until either an
event is available or the time time is reached, whichever comes
first.
RETURN VALUE
On success, 0 is returned. On failure, a negative value is
returned.
ERRORS
sem does not refer to a valid task (-EINVAL)
extern int rt_sem_wait_timed
(SEM* sem, RTIME delay);
SYNOPSIS
#include "rtl_sched.h"
DESCRIPTION
Waits for an event: if none is available, the process is
blocked in priority order on the semaphore waiting list until either an
event is available or the time delay has expired, whichever comes
first.
RETURN VALUE
On success, 0 is returned. On failure, a negative value is
returned.
ERRORS
sem does not refer to a valid task (-EINVAL)