-.\" $OpenBSD: sem_destroy.3,v 1.6 2013/06/05 03:44:50 tedu Exp $
+.\" $OpenBSD: sem_destroy.3,v 1.7 2023/02/11 21:13:56 jmc Exp $
.\"
.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
.\" All rights reserved.
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD: src/lib/libc_r/man/sem_destroy.3,v 1.9 2001/10/01 16:09:09 ru Exp $
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: February 11 2023 $
.Dt SEM_DESTROY 3
.Os
.Sh NAME
.Fn sem_destroy ,
.Fa sem
is unusable until re-initialized by another call to
-.Fn sem_init .
+.Xr sem_init 3 .
.Sh RETURN VALUES
.Rv -std sem_destroy
.Sh ERRORS
-.\" $OpenBSD: sem_init.3,v 1.7 2021/04/06 19:59:32 kn Exp $
+.\" $OpenBSD: sem_init.3,v 1.8 2023/02/11 21:13:56 jmc Exp $
.\"
.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
.\" All rights reserved.
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD: src/lib/libc_r/man/sem_init.3,v 1.11 2001/10/01 16:09:09 ru Exp $
-.Dd $Mdocdate: April 6 2021 $
+.Dd $Mdocdate: February 11 2023 $
.Dt SEM_INIT 3
.Os
.Sh NAME
.Fn sem_init ,
.Fa sem
can be used as an argument in subsequent calls to
-.Fa sem_wait ,
-.Fa sem_trywait ,
-.Fa sem_post ,
+.Xr sem_wait 3 ,
+.Xr sem_trywait 3 ,
+.Xr sem_post 3 ,
and
-.Fa sem_destroy .
+.Xr sem_destroy 3 .
.Fa sem
is no longer valid after a successful call to
-.Fa sem_destroy .
+.Xr sem_destroy 3 .
.Sh RETURN VALUES
.Rv -std sem_init
.Sh ERRORS
It is an error to call
-.Fn sem_destroy
+.Xr sem_destroy 3
on a named semaphore created by
-.Fn sem_open .
+.Xr sem_open 3 .
.Pp
.Fn sem_init
will fail if:
-.\" $OpenBSD: sem_open.3,v 1.11 2015/09/22 08:43:12 sobrado Exp $
+.\" $OpenBSD: sem_open.3,v 1.12 2023/02/11 21:13:56 jmc Exp $
.\"
.\" Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: September 22 2015 $
+.Dd $Mdocdate: February 11 2023 $
.Dt SEM_OPEN 3
.Os
.Sh NAME
It is an error to call
.Fn sem_close
with an unnamed semaphore or to call
-.Fn sem_destroy
+.Xr sem_destroy 3
with a named semaphore.
.Pp
.Fn sem_open
-.\" $OpenBSD: sem_post.3,v 1.5 2013/06/05 03:44:50 tedu Exp $
+.\" $OpenBSD: sem_post.3,v 1.6 2023/02/11 21:13:56 jmc Exp $
.\"
.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
.\" All rights reserved.
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD: src/lib/libc_r/man/sem_post.3,v 1.10 2001/10/01 16:09:09 ru Exp $
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: February 11 2023 $
.Dt SEM_POST 3
.Os
.Sh NAME
.Fn sem_post
is called, then the highest priority thread that has been blocked the longest on
the semaphore will be allowed to return from
-.Fn sem_wait .
+.Xr sem_wait 3 .
.Pp
.Fn sem_post
is signal-reentrant and may be called within signal handlers.