From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by sourceware.org (Postfix) with ESMTPS id 634BD3858C56 for ; Sun, 3 Mar 2024 13:02:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 634BD3858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 634BD3858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2604:1380:40e1:4800::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709470965; cv=none; b=XirVMxo+2Z3u/jXAmUORsRcxWhYZfdJZED/GE00msDyutWjA4JLgwop8J+3wxDEIMkoSVrV14ZThItD1JIWWyLA23zUwkXNKnQ1LxF9Lem20V3fqJcPaaFYv7pd0jllCeyCCvYWWCszvzACF9R8fen3ktKWh26fpBTKAqltC96I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709470965; c=relaxed/simple; bh=ygoEEpZ6azYEb5HHiu98itSFP/0JLF70trcyRvJrE5s=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=WnI7H2kNcDfnirHkluc5QtK/IFcTco5Tly2OcP9nUHpvOKf8rBQU5ixveXcQF6CTAFgruvv2Atl0q45aXv3oTBl2xmdVxzOtXO7n1I4/PBGSNRrbvoGeA+adNDbDchm75tf/RGrvrbzGDU/KBDWiNpZ1TR2YNztZhRely8VUGk4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id CD4B2CE015B; Sun, 3 Mar 2024 13:02:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D011C433C7; Sun, 3 Mar 2024 13:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709470959; bh=ygoEEpZ6azYEb5HHiu98itSFP/0JLF70trcyRvJrE5s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bdNFqbmH6qG5aPJ4Fp+3oNehXVf66FYFfiv91aFOvJXqdDNcD6V2Ok/13kiu2Yskd oMQlfn7rTunBGVJH8RUEaFnCPtMyBHDLbSIBAYy0eJ3tjDNcrOmhlHo8AObkZAkIve U81B6rNpXTp5zjkIb1X7HpsWq+szVMU1rJKA1dQJCQwCVGeYQqHlXCjxctfjIihStH uY2pA9qyA8XhGpj2ir7qBH1k6+yVXa6foSlqOQaJ0XUMoNSTQl0/h5xvzNScRSYTwo q5tHlASr93dDdt7nCLC94LqCcmMALvQm5P1WtbFiFeXYZ7+heqK8JDHzv5wIkkqt1W 00r5tPXyvKGxQ== Date: Sun, 3 Mar 2024 14:02:35 +0100 From: Alejandro Colomar To: Bruno Haible , linux-man@vger.kernel.org, Elliott Hughes Cc: Alejandro Colomar , Stefan Puiu , GNU C Library , linux-api@vger.kernel.org Subject: [PATCH v2 2/2] nanosleep.2: Use 'duration' rather than 'request' Message-ID: <20240303130233.18238-1-alx@kernel.org> X-Mailer: git-send-email 2.43.0 References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="u3nmbnhrztjh4a3z" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --u3nmbnhrztjh4a3z Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [PATCH v2 2/2] nanosleep.2: Use 'duration' rather than 'request' MIME-Version: 1.0 It seems much more clear. Suggested-by: Elliott Hughes Cc: Stefan Puiu Cc: Bruno Haible Signed-off-by: Alejandro Colomar --- 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 .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. --=20 2.43.0 --u3nmbnhrztjh4a3z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6jqH8KTroDDkXfJAnowa+77/2zIFAmXkdOsACgkQnowa+77/ 2zJ5bhAAl1SllnYTog3qOc5Cg0A7Hor6a6ifZDNNc8kuYqxkxDO2XJL7+O7R84L0 0EkA3C5Xbw1YkFu0xnZKBWY9pJEQu4sGorO2UaRP9WX24oYhk7zb9gLPktYrP2bH emrUgI2dMwMY2uyrVEHfDSgfjtjY0UFavt4S9a/esxqllQ4ZVf+u7VcHgtIoGopi /Sn0TB4IJ3/vT9A48ywBgmu29ddjxlwxfQf1Dlcni2sxKE8eU6gVNJCcduxmfYpD Uq9HE847jr4FwwaxmBGOM0IPUXGr5lJsYVBnUsW4GY96xPrJwOAYKBFZ2PXUgJ9k V3yFiRVMtFgLGhGMlVO6TEtAozY6v767erdJPpqzMZCNtFxzjK2qFrtd10iicJ7l gIs2Il5y93ZVpy1OfY2h8/F5Jb0UuYY3KyKvjjRQa5FsQWRsI26elB7ABXO1WYr3 5l749x9GZMtTDT1zB9/KxD/VEPOJ93dxYJFYRqWL2G3DolIXUbz1mo/VGx6MePD7 YvcMpAi8YuXV665zbuP4dra6WXX7h9qDnsgZwYIXRUe7DuP0LXWz67jU5TvWn/Pp pmZTEP+fDbSkKrR+RPz7zFEyTCcjpHAv3/1eF5P3+Wsx/v980YKbzUPVwkTXjYMK g0SzSxkkJk9o0j2c+yIUuU8b/rTrugv1IvGgKnX7W4c9JsO4TTY= =h3KE -----END PGP SIGNATURE----- --u3nmbnhrztjh4a3z--