sem_destroy(3R)
NAME
sem_destroy − destroy an unnamed semaphore
SYNOPSIS
cc [ flag ... ] file ... −lposix4 [ library ... ]
#include <semaphore.h>
int sem_destroy(sem_t ∗sem);
DESCRIPTION
The sem_destroy() function is used to destroy the unnamed semaphore, sem, which was initialized by sem_init(3R).
RETURN VALUES
If successful, sem_destroy() returns 0, otherwise it returns −1 and sets errno to indicate the error condition.
ERRORS
EINVAL The sem argument is not a valid semaphore.
ENOSYS The sem_destroy() function is not supported.
EBUSY Other processes (or LWPs or threads) are currently blocked on the semaphore.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| MT-Level | MT-Safe |
SEE ALSO
sem_init(3R), sem_open(3R), attributes(5)
SunOS 5.6 — Last change: 30 Dec 1996