From patchwork Sun Mar 3 13:02:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1907271 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=bdNFqbmH; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tnhny3yc1z23fC for ; Mon, 4 Mar 2024 00:03:02 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 005553858409 for ; Sun, 3 Mar 2024 13:03:00 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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-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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org 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.