aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-03-03 13:01:57 +0100
committerAlejandro Colomar <alx@kernel.org>2024-03-03 13:58:44 +0100
commit99f6ea6ac2ce3333ffe4835a32d7341213ed7033 (patch)
tree758879a1d09f4336204c991c8121389645739988
parent980ac57d4296bf4117b9dc42b2312d0e360b8f9c (diff)
downloadman-pages-99f6ea6ac2ce3333ffe4835a32d7341213ed7033.tar.gz
nanosleep.2: Use 'duration' rather than 'request'
It seems much more clear. Suggested-by: Elliott Hughes <enh@google.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Cc: Bruno Haible <bruno@clisp.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--man2/nanosleep.215
1 files changed, 8 insertions, 7 deletions
diff --git a/man2/nanosleep.2 b/man2/nanosleep.2
index a8d9f5a8a9..e7132ee321 100644
--- a/man2/nanosleep.2
+++ b/man2/nanosleep.2
@@ -22,7 +22,7 @@ Standard C library
.nf
.B #include <time.h>
.P
-.BI "int nanosleep(const struct timespec *" req ,
+.BI "int nanosleep(const struct timespec *" duration ,
.BI " struct timespec *_Nullable " rem );
.fi
.P
@@ -39,7 +39,7 @@ Feature Test Macro Requirements for glibc (see
.BR nanosleep ()
suspends the execution of the calling thread
until either at least the time specified in
-.I *req
+.I *duration
has elapsed, or the delivery of a signal
that triggers the invocation of a handler in the calling thread or
that terminates the process.
@@ -80,7 +80,7 @@ does not interact with signals;
and it makes the task of resuming a sleep that has been
interrupted by a signal handler easier.
.SH RETURN VALUE
-On successfully sleeping for the requested interval,
+On successfully sleeping for the requested duration,
.BR nanosleep ()
returns 0.
If the call is interrupted by a signal handler or encounters an error,
@@ -138,8 +138,9 @@ have no effect on threads that are blocked waiting for a relative time
service based upon this clock, including the
.BR nanosleep ()
function; ...
-Consequently, these time services shall expire when the requested relative
-interval elapses, independently of the new or old value of the clock.
+Consequently,
+these time services shall expire when the requested duration elapses,
+independently of the new or old value of the clock.
.RE
.SH STANDARDS
POSIX.1-2008.
@@ -158,8 +159,8 @@ or
This special extension was removed in Linux 2.5.39,
and is thus not available in Linux 2.6.0 and later kernels.
.SH NOTES
-If the interval specified in
-.I req
+If the
+.I duration
is not an exact multiple of the granularity underlying clock (see
.BR time (7)),
then the interval will be rounded up to the next multiple.