extern void  rt_sem_init
(SEM* sem, int value);
  
return to index
  

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);
  
return to index
  

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);
  
return to index
  

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);
  
return to index
  

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);
  
return to index
  

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);
  
return to index
  

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);
  
return to index
  

SYNOPSIS

#include "rtl_sched.h"

DESCRIPTION

Waits for an event: if none is available, the process is blockedin 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)