From nobody Mon May 13 14:26:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VdMHN2H6cz5KNKb; Mon, 13 May 2024 14:26:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VdMHM3zCmz4ZDN; Mon, 13 May 2024 14:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715610383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=liymykgxb/luAvyYvnPNjX2G//QXUnBFOZNEvG+uBjE=; b=Qg6HPmtNjDkM1ApDk99rXzC1MrifwPsy3VB3k41r3d3mNaHZVl7ECTShVBN4Svs+S7w+o2 qMrnFLKJMnWZZ8yFy+yBfxwIstCk+6AoyyW62hpnnUeFlyutB6xuzyywDHVxc+wZIvTbmO CzyOC/Rb2GhYov9HNNk/z1Q/vyIXHhDAmjRpaIpO0A7f6BCEy9RIcIWrFdLIbWY/HaWB8E kqZp0J8B1Gw1bwd8VIidbq25AEhS2iUni32AtmcL+x7Q71H7BDFNGqg6+cVQpAUC8AuvAf mbRCCTKD80ntNb98S3DTDzY1+15NRk5r3Sv1CE+TPrQ9pYsXphacbjmwRJsyLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715610383; a=rsa-sha256; cv=none; b=hX2wUFKOz+LWl0rRvWH1daPCDwcEZYYcZSdWtlNwijBpB//TLiR5PalH1LNeHO57jeCnRk j35hCOQ9AeEgxFUn0CNTyHQob/NCCzPmwesFy2jBzLrMjWGtWu3CqwPvTusfRUEHLV/aWz J/El3iTSD2+qtV0iLVfiR2goXe00xEgcNIWFFlijeoD158i6/MzP6S2lmDlCum6ztXchpl e4yCOnT81RLQMqWPDdG+QiZ9pxQlDDAOB4v16jDoKSde93vfwxuSGoUfjdXis/fwGp0C0M EK2ymKBd1YNeaej3SluZIpKIp+Y0QDaOg77dAUs1U1hTDvza6GyMYeo9Kl4Hlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715610383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=liymykgxb/luAvyYvnPNjX2G//QXUnBFOZNEvG+uBjE=; b=Kc6u9HkhvzWRNYW90ncT8ZNhgSuLy3psdtQkezj+WPwE9ZYfLSiCVOx+M7oSNBsh0SFxS0 ushGPiXf/L92OGgrYkh1cdu8NvB2Ffs+dWBr0zGTUyTQjSSXHZF3TPTRq+DTeO69bjmSP5 svOM3iVO4VT5G1TkDju8rO6LdIbXIc1lInIP40RUq6xrcrQr82CqTz5I3CpE+bAVNKa9WK Uz592O1Q7kluJJnM/qpXBv2AmcyEBIClppznd3GkApJX2WXJOGpEyzGXnfBUBFs3QqdIi/ dIfOvDup22B8FaKtJzLGaBIvSZsTjJYgAirkePKQjb8qYW81cZq/fSgzcv1oaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VdMHM3Y63zrjJ; Mon, 13 May 2024 14:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44DEQN2W021770; Mon, 13 May 2024 14:26:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44DEQNuS021767; Mon, 13 May 2024 14:26:23 GMT (envelope-from git) Date: Mon, 13 May 2024 14:26:23 GMT Message-Id: <202405131426.44DEQNuS021767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c595a834ebbd - stable/13 - clock_gettime.2: Clarify CLOCK_* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c595a834ebbd4b6fa49b40c8f9cb4e3dda082c4b Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c595a834ebbd4b6fa49b40c8f9cb4e3dda082c4b commit c595a834ebbd4b6fa49b40c8f9cb4e3dda082c4b Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-08 19:54:10 +0000 Commit: Ed Maste CommitDate: 2024-05-13 14:26:10 +0000 clock_gettime.2: Clarify CLOCK_* Clarify that CLOCK_* (e.g., CLOCK_REALTIME) do not necessarily default to CLOCK_*_FAST. PR: 259642 (cherry picked from commit 16e4487e5f82e1ff501fe5af6afbfbd0435a1cbf) --- lib/libc/sys/clock_gettime.2 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2 index 7b325a2bb394..ed469153a40e 100644 --- a/lib/libc/sys/clock_gettime.2 +++ b/lib/libc/sys/clock_gettime.2 @@ -94,19 +94,28 @@ Returns the execution time of the calling thread. .El .Pp The clock IDs +.Fa CLOCK_REALTIME , +.Fa CLOCK_MONOTONIC , +and +.Fa CLOCK_UPTIME +perform a full time counter query. +The clock IDs with the _FAST suffix, i.e., .Fa CLOCK_REALTIME_FAST , .Fa CLOCK_MONOTONIC_FAST , -.Fa CLOCK_UPTIME_FAST -are analogs of corresponding IDs without _FAST suffix but do not perform +and +.Fa CLOCK_UPTIME_FAST , +do not perform a full time counter query, so their accuracy is one timer tick. Similarly, .Fa CLOCK_REALTIME_PRECISE , .Fa CLOCK_MONOTONIC_PRECISE , +and .Fa CLOCK_UPTIME_PRECISE are used to get the most exact value as possible, at the expense of execution time. The clock IDs -.Fa CLOCK_REALTIME_COARSE , +.Fa CLOCK_REALTIME_COARSE +and .Fa CLOCK_MONOTONIC_COARSE are aliases of corresponding IDs with _FAST suffix for compatibility with other systems.