RTEMS Logo

RTEMS 4.8.0 On-Line Library


Semaphore Manager sem_destroy - Destroy an unnamed semaphore

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

9.4.2: sem_destroy - Destroy an unnamed semaphore

CALLING SEQUENCE:

int sem_destroy(
  sem_t *sem
);

STATUS CODES:

EINVAL
The value argument exceeds SEM_VALUE_MAX
ENOSYS
The function sem_init is not supported by this implementation
EBUSY
There are currently processes blocked on the semaphore

DESCRIPTION:

The sem_destroy function is used to destroy an unnamed semaphore refered to by "sem". sem_destroy can only be used on a semaphore that was created using sem_init.

NOTES:

If the functions completes successfully, it shall return a value of zero. Otherwise, it shall return a value of -1 and set "errno" to specify the error that occurred.

Multiprocessing is currently not supported in this implementation.


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2007OAR Corporation