svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
sem_destroy(3c)
Standard C Library Functions sem_destroy(3C)
NAME
sem_destroy - destroy an unnamed semaphore
SYNOPSIS
#include <semaphore.h>
int sem_destroy(sem_t *sem);
DESCRIPTION
The sem_destroy() function is used to destroy the unnamed semaphore
indicated by sem. Only a semaphore that was created using sem_init(3C)
may be destroyed using sem_destroy(); the effect of calling
sem_destroy() with a named semaphore is undefined. The effect of subse‐
quent use of the semaphore sem is undefined until sem is re-initialized
by another call to sem_init(3C).
It is safe to destroy an initialised semaphore upon which no threads
are currently blocked. The effect of destroying a semaphore upon which
other threads are currently blocked is undefined.
RETURN VALUES
If successful, sem_destroy() returns 0, otherwise it returns −1 and
sets errno to indicate the error.
ERRORS
The sem_destroy() function will fail if:
EINVAL The sem argument is not a valid semaphore.
The sem_destroy() function may fail if:
EBUSY There are currently processes (or LWPs or threads) blocked on
the semaphore.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe _ Stan‐
dardSee standards(7).
SEE ALSO
sem_init(3C), sem_open(3C), attributes(7), standards(7)
Oracle Solaris 11.4 5 Feb 2008 sem_destroy(3C)