From owner-dev-commits-ports-main@freebsd.org Thu Jul 1 18:34:33 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3033A650B4B; Thu, 1 Jul 2021 18:34:33 +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 4GG6Lx0shqz4kCk; Thu, 1 Jul 2021 18:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 06967255B9; Thu, 1 Jul 2021 18:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161IYWIe008984; Thu, 1 Jul 2021 18:34:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161IYWe2008983; Thu, 1 Jul 2021 18:34:32 GMT (envelope-from git) Date: Thu, 1 Jul 2021 18:34:32 GMT Message-Id: <202107011834.161IYWe2008983@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Warner Losh Subject: git: 227228845cd6 - main - x11-servers/xorg-server: patch to utilize CLOCK_MONOTONIC_FAST for the clock MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 227228845cd678bfb6cc8e9183e259f88e55567b Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 18:34:33 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/ports/commit/?id=227228845cd678bfb6cc8e9183e259f88e55567b commit 227228845cd678bfb6cc8e9183e259f88e55567b Author: Sean Farley AuthorDate: 2021-07-01 18:22:00 +0000 Commit: Warner Losh CommitDate: 2021-07-01 18:30:11 +0000 x11-servers/xorg-server: patch to utilize CLOCK_MONOTONIC_FAST for the clock This patches the X server to use CLOCK_MONOTONIC_FAST instead of CLOCK_MONOTONIC for the clock. This is basically a reintroduction of r208485 by jkim@ that was removed by accident(?). Since the X server is fine with the Linux _COARSE clock the accuracy of the FreeBSD _FAST clock should work too. I have run with this patch for a long time without ill effects. PR: 252816 Reviewed by: imp, markj, jkim, mhorne Approved by: x11 --- x11-servers/xorg-server/Makefile | 2 +- x11-servers/xorg-server/files/patch-os-utils.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile index 8f3e831fc67a..39ec9df6267a 100644 --- a/x11-servers/xorg-server/Makefile +++ b/x11-servers/xorg-server/Makefile @@ -2,7 +2,7 @@ PORTNAME?= xorg-server PORTVERSION?= 1.20.11 -PORTREVISION?= 2 +PORTREVISION?= 3 PORTEPOCH?= 1 CATEGORIES= x11-servers MASTER_SITES= XORG/individual/xserver diff --git a/x11-servers/xorg-server/files/patch-os-utils.c b/x11-servers/xorg-server/files/patch-os-utils.c new file mode 100644 index 000000000000..8f9c4f1f137d --- /dev/null +++ b/x11-servers/xorg-server/files/patch-os-utils.c @@ -0,0 +1,18 @@ +--- os/utils.c.orig 2014-04-15 01:01:57 UTC ++++ os/utils.c +@@ -443,11 +443,11 @@ GetTimeInMillis(void) + static clockid_t clockid; + + if (!clockid) { +-#ifdef CLOCK_MONOTONIC_COARSE +- if (clock_getres(CLOCK_MONOTONIC_COARSE, &tp) == 0 && ++#ifdef CLOCK_MONOTONIC_FAST ++ if (clock_getres(CLOCK_MONOTONIC_FAST, &tp) == 0 && + (tp.tv_nsec / 1000) <= 1000 && +- clock_gettime(CLOCK_MONOTONIC_COARSE, &tp) == 0) +- clockid = CLOCK_MONOTONIC_COARSE; ++ clock_gettime(CLOCK_MONOTONIC_FAST, &tp) == 0) ++ clockid = CLOCK_MONOTONIC_FAST; + else + #endif + if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)