summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man3/sem_wait.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
commit4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch)
tree3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/opensuse-tumbleweed/man3/sem_wait.3
parentAdding upstream version 4.22.0. (diff)
downloadmanpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz
manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man3/sem_wait.3')
-rw-r--r--upstream/opensuse-tumbleweed/man3/sem_wait.319
1 files changed, 9 insertions, 10 deletions
diff --git a/upstream/opensuse-tumbleweed/man3/sem_wait.3 b/upstream/opensuse-tumbleweed/man3/sem_wait.3
index b1302ca3..f09f6974 100644
--- a/upstream/opensuse-tumbleweed/man3/sem_wait.3
+++ b/upstream/opensuse-tumbleweed/man3/sem_wait.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_wait 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH sem_wait 3 2024-05-02 "Linux man-pages (unreleased)"
.SH NAME
sem_wait, sem_timedwait, sem_trywait \- lock a semaphore
.SH LIBRARY
@@ -12,18 +12,18 @@ POSIX threads library
.SH SYNOPSIS
.nf
.B #include <semaphore.h>
-.PP
+.P
.BI "int sem_wait(sem_t *" sem );
.BI "int sem_trywait(sem_t *" sem );
.BI "int sem_timedwait(sem_t *restrict " sem ,
.BI " const struct timespec *restrict " abs_timeout );
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR sem_timedwait ():
.nf
_POSIX_C_SOURCE >= 200112L
@@ -38,7 +38,7 @@ If the semaphore currently has the value zero,
then the call blocks until either it becomes possible to perform
the decrement (i.e., the semaphore value rises above zero),
or a signal handler interrupts the call.
-.PP
+.P
.BR sem_trywait ()
is the same as
.BR sem_wait (),
@@ -48,7 +48,7 @@ then call returns an error
set to
.BR EAGAIN )
instead of blocking.
-.PP
+.P
.BR sem_timedwait ()
is the same as
.BR sem_wait (),
@@ -62,7 +62,7 @@ argument points to a
.BR timespec (3)
structure that specifies an absolute timeout
in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
-.PP
+.P
If the timeout has already expired by the time of the call,
and the semaphore could not be locked immediately,
then
@@ -71,7 +71,7 @@ fails with a timeout error
.RI ( errno
set to
.BR ETIMEDOUT ).
-.PP
+.P
If the operation can be performed immediately, then
.BR sem_timedwait ()
never fails with a timeout error, regardless of the value of
@@ -127,7 +127,6 @@ T{
.BR sem_timedwait ()
T} Thread safety MT-Safe
.TE
-.sp 1
.SH STANDARDS
POSIX.1-2008.
.SH HISTORY
@@ -150,7 +149,7 @@ The second command-line argument specifies the length
of the timeout, in seconds, for
.BR sem_timedwait ().
The following shows what happens on two different runs of the program:
-.PP
+.P
.in +4n
.EX
.RB "$" " ./a.out 2 3"