xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Fri Nov 1 08:35:19 CET 2013


 Xext/sync.c    |   11 ++++++++++-
 configure.ac   |    2 +-
 os/backtrace.c |    5 +++--
 3 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 977e2644b1d9e13b44debcb9a372bbc832ee32a3
Merge: 66c5ee0 f36f5a6
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Nov 1 00:34:18 2013 -0700

    Merge remote-tracking branch 'whot/for-keith'

commit f36f5a65f639b6524191d888d5bf89e73027156c
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Oct 30 15:40:58 2013 +1000

    sync: fix corner-case in triggering idle alarms
    
    ProcessInputEvent() resets the device idle times. If idle time was higher than
    the lower bracket, this should trigger an event in the idle time wakeup
    handler.
    
    If processing is slow, the idle time may advance past the lower bracket
    between the reset and the time the BlockHandler is called. In that case, we'd
    never schedule a wakeup to handle the event, causing us to randomly miss
    events.
    
    Ran tests with a neg transition trigger on 5ms with 200 repeats of the test
    and it succeeded. Anything below that gets a bit tricky to make sure the
    server sees the same idle time as the client usleeps for.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Keith Packard <keithp at keithp.com>

diff --git a/Xext/sync.c b/Xext/sync.c
index b2ee92e..53f769d 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2654,7 +2654,16 @@ IdleTimeBlockHandler(pointer pCounter, struct timeval **wt, pointer LastSelectMa
     IdleTimeQueryValue(counter, &idle);
     counter->value = idle;      /* push, so CheckTrigger works */
 
-    if (less && XSyncValueLessOrEqual(idle, *less)) {
+    /**
+     * There's an indefinite amount of time between ProcessInputEvents()
+     * where the idle time is reset and the time we actually get here. idle
+     * may be past the lower bracket if we dawdled with the events, so
+     * check for whether we did reset and bomb out of select immediately.
+     */
+    if (less && XSyncValueGreaterThan(idle, *less) &&
+        LastEventTimeWasReset(priv->deviceid)) {
+        AdjustWaitForDelay(wt, 0);
+    } else if (less && XSyncValueLessOrEqual(idle, *less)) {
         /*
          * We've been idle for less than the threshold value, and someone
          * wants to know about that, but now we need to know whether they
commit e8961b718d82f1c081ec110d8d962f64e8406b82
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Oct 22 14:24:52 2013 +1000

    os: use a constant for backtrace array size
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>

diff --git a/os/backtrace.c b/os/backtrace.c
index 426f9b1..3d1195b 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -114,14 +114,15 @@ xorg_backtrace(void)
 void
 xorg_backtrace(void)
 {
-    void *array[64];
+    const int BT_SIZE = 64;
+    void *array[BT_SIZE];
     const char *mod;
     int size, i;
     Dl_info info;
 
     ErrorFSigSafe("\n");
     ErrorFSigSafe("Backtrace:\n");
-    size = backtrace(array, 64);
+    size = backtrace(array, BT_SIZE);
     for (i = 0; i < size; i++) {
         int rc = dladdr(array[i], &info);
 
commit f12a9ed870017f35cf6d2a82b1405e843aae42ac
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Oct 29 15:24:11 2013 +1000

    configure: remove a comment
    
    94ed0ba1b5043ad9fc33b42756af447d5ab15bbd moved backtracing into the DIX, so
    this comment is outdated. since no-one noticed and it's easier to just grep
    than update file references, remove the comment.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>

diff --git a/configure.ac b/configure.ac
index e7385f8..75ec70b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -300,7 +300,7 @@ AC_CHECK_HEADER([machine/apmvar.h],[
 AM_CONDITIONAL(BSD_APM, [test "x$ac_cv_BSD_APM" = xyes])
 AM_CONDITIONAL(BSD_KQUEUE_APM, [test "x$ac_cv_BSD_KQUEUE_APM" = xyes])
 	
-dnl glibc backtrace support check (hw/xfree86/common/xf86Events.c)
+dnl glibc backtrace support check
 AC_CHECK_HEADER([execinfo.h],[
     AC_CHECK_LIB(c, backtrace, [
         AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support])


More information about the xorg-commit mailing list