Date: Thu, 1 Jul 2021 18:34:32 GMT From: Warner Losh <imp@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 227228845cd6 - main - x11-servers/xorg-server: patch to utilize CLOCK_MONOTONIC_FAST for the clock Message-ID: <202107011834.161IYWe2008983@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/ports/commit/?id=227228845cd678bfb6cc8e9183e259f88e55567b commit 227228845cd678bfb6cc8e9183e259f88e55567b Author: Sean Farley <scf@FreeBSD.org> AuthorDate: 2021-07-01 18:22:00 +0000 Commit: Warner Losh <imp@FreeBSD.org> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107011834.161IYWe2008983>