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);
typedef struct {
...
} sem_t; /∗opaque POSIX.4 semaphore∗/
MT-LEVEL
MT-Safe
DESCRIPTION
sem_destroy() 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 sem is not a valid semaphore.
ENOSYS sem_destroy() is not supported by this implementation.
EBUSY Other processes (or LWPs or threads) are currently blocked on the semaphore.
SEE ALSO
BUGS
In Solaris 2.5, these functions always return −1 and set errno to ENOSYS, because this release does not support the Semaphores option. It is our intention to provide support for these interfaces in future releases.
SunOS 5.5.1 — Last change: 12 Aug 1993