.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
-.TH SEM_POST 3 2012-05-13 "Linux" "Linux Programmer's Manual"
+.TH SEM_POST 3 2020-04-11 "Linux" "Linux Programmer's Manual"
.SH NAME
sem_post \- unlock a semaphore
.SH SYNOPSIS
.nf
.B #include <semaphore.h>
-.sp
+.PP
.BI "int sem_post(sem_t *" sem );
.fi
-.sp
+.PP
Link with \fI\-pthread\fP.
.SH DESCRIPTION
.BR sem_post ()
.B EOVERFLOW
.\" Added in POSIX.1-2008 TC1 (Austin Interpretation 213)
The maximum allowable value for a semaphore would be exceeded.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR sem_post ()
+T} Thread safety MT-Safe
+.TE
.SH CONFORMING TO
POSIX.1-2001.
.SH NOTES
.BR sem_post ()
is async-signal-safe:
it may be safely called within a signal handler.
-.SH EXAMPLE
+.SH EXAMPLES
See
-.BR sem_wait (3).
+.BR sem_wait (3)
+and
+.BR shm_open (3).
.SH SEE ALSO
.BR sem_getvalue (3),
.BR sem_wait (3),
-.BR sem_overview (7)
+.BR sem_overview (7),
+.BR signal-safety (7)