mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-19 00:13:33 +00:00
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
This commit is contained in:
parent
18398269fb
commit
227228845c
@ -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
|
||||
|
18
x11-servers/xorg-server/files/patch-os-utils.c
Normal file
18
x11-servers/xorg-server/files/patch-os-utils.c
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user