xserver: Branch 'master'
Daniel Stone
daniels at kemper.freedesktop.org
Thu Oct 26 01:10:15 EEST 2006
configure.ac | 2 +-
os/utils.c | 19 +++----------------
2 files changed, 4 insertions(+), 17 deletions(-)
New commits:
diff-tree 004d00e6689f452fc9fdf91f5ffc6d6aed697d54 (from d285833290316cb5dd1e7f1e52c96be3e9cf21cd)
Author: Daniel Stone <daniel at fooishbar.org>
Date: Thu Oct 26 01:10:08 2006 +0300
GetTimeInMillis: simplify monotonic test
We don't actually need to get the CPU clock ID, which means we don't need
the monotonic_usable test. Since there's now only one branch, the
compiler will treat that as likely, so we don't need xproto 7.0.9 anymore.
The fallthrough to gettimeofday() is preserved.
diff --git a/configure.ac b/configure.ac
index 0f2ddd5..c0cc003 100644
--- a/configure.ac
+++ b/configure.ac
@@ -515,7 +515,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.l
XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
dnl Core modules for most extensions, et al.
-REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto [xproto >= 7.0.9] xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto [kbproto >= 1.0.3]"
+REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto [kbproto >= 1.0.3]"
REQUIRED_LIBS="xfont xau fontenc"
AM_CONDITIONAL(XV, [test "x$XV" = xyes])
diff --git a/os/utils.c b/os/utils.c
index 379291c..7d258a4 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -268,8 +268,6 @@ int auditTrailLevel = 1;
_X_EXPORT Bool Must_have_memory = FALSE;
-static int monotonic_usable = -1;
-
#ifdef AIXV3
int SyncOn = 0;
extern int SelectWaitTime;
@@ -550,22 +548,11 @@ _X_EXPORT CARD32
GetTimeInMillis(void)
{
struct timeval tv;
+
#ifdef MONOTONIC_CLOCK
struct timespec tp;
- int spare = 0;
-
- if (_X_UNLIKELY(monotonic_usable == -1)) {
- if (clock_gettime(0, &tp) == 0 &&
- clock_getcpuclockid(0, &spare) == 0)
- monotonic_usable = 1;
- else
- monotonic_usable = 0;
- }
-
- if (_X_LIKELY(monotonic_usable == 1)) {
- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
- return (tp.tv_sec * 1000) + (tp.tv_nsec / 1000000);
- }
+ if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
+ return (tp.tv_sec * 1000) + (tp.tv_nsec / 1000000);
#endif
X_GETTIMEOFDAY(&tv);
More information about the xorg-commit
mailing list