xserver-multidpi/hw
Keith Packard 30ac756798 Create a threaded mechanism for input [v7]
The current SIGIO signal handler method, used at generation of input events,
has a bunch of oddities. This patch introduces an alternative way using a
thread, which is used to select() all input device file descriptors.

A mutex was used to control the access to input structures by the main and input
threads. Two pipes to emit alert events (such hotplug ones) and guarantee the
proper communication between them was also used.

Co-authored-by: Fernando Carrijo <fcarrijo@freedesktop.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>

v2: Fix non-Xorg link. Enable where supported by default.

    This also splits out the actual enabling of input threads to
    DDX-specific patches which follow

v3: Make the input lock recursive

v4: Use regular RECURSIVE_MUTEXes instead of rolling our own
    Respect the --disable-input-thread configuration option by
    providing stubs that expose the same API/ABI.

    Respond to style comments from Peter Hutterer.

v5: use __func__ in inputthread debug and error mesages.

    Respond to style comments from Peter Hutterer.

v6: use AX_PTHREAD instead of inlining pthread tests.

    Suggested by Emil Velikov <emil.l.velikov@gmail.com>

v7: Use pthread_sigmask instead of sigprocmask when using threads

    Suggested by Adam Jackson <ajax@redhat.com>

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-05-26 16:07:54 -07:00
..
dmx Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
kdrive kdrive: Don't lock input across read in KdNotifyFd 2016-05-26 16:07:54 -07:00
vfb vfb: Re-add LD_EXPORT_SYMBOLS_FLAG to LDFLAGS 2016-03-23 14:47:24 -04:00
xfree86 Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
xnest xnest: Fix needless build dependency on xcb-util-keysyms 2015-11-24 10:41:14 -05:00
xquartz XQuartz: Update copyright years 2016-05-04 00:08:34 -07:00
xwayland xwayland: Move sprite invalidation logic into mipointer 2016-05-25 11:00:56 -04:00
xwin hw/xwin: xcbify internal window manager 2016-04-07 10:31:39 +01:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00