sem_destroy(3R) manual page
Table of Contents
sem_destroy - destroy an unnamed semaphore
cc [ flag ... ] file
... -lposix4 [ library ... ]
#include <semaphore.h>
int sem_destroy(sem_t *sem);
typedef struct {
...
} sem_t; /*opaque POSIX.4 semaphore*/
MT-Safe
sem_destroy() is used to destroy the unnamed semaphore, sem,
which was initialized by sem_init(3R)
.
If successful, sem_destroy()
returns 0, otherwise it returns -1 and sets errno to indicate the error
condition.
- 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.
sem_init(3R)
,
sem_open(3R)
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.
Table of Contents