.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
-.TH SEM_DESTROY 3 2015-08-08 "Linux" "Linux Programmer's Manual"
+.TH SEM_DESTROY 3 2017-09-15 "Linux" "Linux Programmer's Manual"
.SH NAME
sem_destroy \- destroy an unnamed semaphore
.SH SYNOPSIS
.BR sem_destroy ()
destroys the unnamed semaphore at the address pointed to by
.IR sem .
-
+.PP
Only a semaphore that has been initialized by
.BR sem_init (3)
should be destroyed using
.BR sem_destroy ().
-
+.PP
Destroying a semaphore that other processes or threads are
currently blocked on (in
.BR sem_wait (3))
produces undefined behavior.
-
+.PP
Using a semaphore that has been destroyed produces undefined results,
until the semaphore has been reinitialized using
.BR sem_init (3).