From: Alejandro Colomar <alx@kernel.org>
To: Bruno Haible <bruno@clisp.org>,
linux-man@vger.kernel.org, Elliott Hughes <enh@google.com>
Cc: Alejandro Colomar <alx@kernel.org>,
Stefan Puiu <stefan.puiu@gmail.com>,
GNU C Library <libc-alpha@sourceware.org>,
linux-api@vger.kernel.org
Subject: [PATCH v2 2/2] nanosleep.2: Use 'duration' rather than 'request'
Date: Sun, 3 Mar 2024 14:02:35 +0100 [thread overview]
Message-ID: <20240303130233.18238-1-alx@kernel.org> (raw)
In-Reply-To: <ZeRzS6mENO8kOh1W@debian>
[-- Attachment #1: Type: text/plain, Size: 2348 bytes --]
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>
---
v2:
- 2/2:
- Drop changes to clock_nanosleep(2). [Bruno]
- Don't say "relative duration". [Bruno]
- 1/2: unchanged, so not resent.
man2/nanosleep.2 | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/man2/nanosleep.2 b/man2/nanosleep.2
index a8d9f5a8a..e7132ee32 100644
--- a/man2/nanosleep.2
+++ b/man2/nanosleep.2
@@ -22,7 +22,7 @@ .SH SYNOPSIS
.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 @@ .SH DESCRIPTION
.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 @@ .SH DESCRIPTION
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 @@ .SH VERSIONS
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 @@ .SH HISTORY
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.
--
2.43.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-03-03 13:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-29 20:51 [PATCH] prctl.2: Fix typo Bruno Haible
2023-10-31 12:40 ` Alejandro Colomar
2023-10-31 14:31 ` Stefan Puiu
2023-10-31 16:11 ` Alejandro Colomar
2023-10-31 16:19 ` enh
2023-10-31 18:40 ` Alejandro Colomar
2023-10-31 19:15 ` enh
2023-10-31 21:23 ` Alejandro Colomar
2023-11-01 0:37 ` enh
2023-11-01 10:16 ` Alejandro Colomar
2024-03-03 12:15 ` [PATCH 0/2] Use terms consistently in function parameter names Alejandro Colomar
2024-03-03 12:15 ` [PATCH 1/2] man*/: epoll_*(), fcntl(), flock(), ioctl(), msgctl(), *prctl(), ptrace(), quotactl(), reboot(), semctl(), shmctl(), lockf(): Consistently use 'op' and 'operation' Alejandro Colomar
2024-03-05 18:12 ` Alejandro Colomar
2024-03-05 19:19 ` enh
2024-03-03 12:15 ` [PATCH 2/2] clock_nanosleep.2, nanosleep.2: Use 'duration' rather than 'request' Alejandro Colomar
2024-03-03 12:45 ` Bruno Haible
2024-03-03 12:55 ` Alejandro Colomar
2024-03-03 13:02 ` Alejandro Colomar [this message]
2024-03-05 0:18 ` enh
2024-03-05 0:34 ` Alejandro Colomar
2024-03-05 0:56 ` enh
2024-03-05 1:11 ` Alejandro Colomar
2024-03-05 1:26 ` [PATCH v3 3/3] clock_nanosleep.2: Use 't' " Alejandro Colomar
2024-03-05 22:22 ` [PATCH 2/2] clock_nanosleep.2, nanosleep.2: Use 'duration' " enh
2023-10-31 17:08 ` [PATCH] prctl.2: Fix typo Bruno Haible
2023-10-31 21:20 ` Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240303130233.18238-1-alx@kernel.org \
--to=alx@kernel.org \
--cc=bruno@clisp.org \
--cc=enh@google.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=stefan.puiu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).