xserver/include
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
..
.gitignore
Makefile.am vidmode: move to a separate library of its own 2016-02-29 16:29:01 -05:00
XIstubs.h
Xprintf.h
busfault.h
callback.h
client.h
closestr.h
closure.h
colormap.h dix: Unexport various implementation details 2015-07-08 16:40:57 -04:00
colormapst.h
cursor.h
cursorstr.h cursor: drop ARGB_CURSOR 2015-06-30 12:17:51 +10:00
dbus-core.h
displaymode.h vidmode: move display mode definitions 2016-02-29 16:28:57 -05:00
dix-config-apple-verbatim.h
dix-config.h.in Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
dix.h dix: Add RootWindowFinalizeCallback 2016-04-18 11:22:58 -04:00
dixaccess.h
dixevents.h
dixfont.h dixfont.h: Include fontutil.h before GetGlyphs is #defined 2015-08-17 18:50:00 -07:00
dixfontstr.h
dixfontstubs.h
dixgrabs.h
dixstruct.h Remove non-smart scheduler. Don't require setitimer. 2015-12-01 13:54:54 -05:00
eventconvert.h
events.h
eventstr.h Input: Add focus-in event source 2015-11-24 11:36:34 +10:00
exevents.h
extension.h
extinit.h
extnsionst.h
gc.h
gcstruct.h
globals.h
glx_extinit.h
hotplug.h
input.h Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
inputstr.h
inpututils.h Input: Add DeviceEventSource enum 2015-11-24 11:36:32 +10:00
kdrive-config.h.in kdrive: Delete unused TOUCHSCREEN define. 2015-10-06 10:43:05 -04:00
list.h Fix uninitialized variable warnings reported by clang 2016-01-06 09:42:59 -05:00
misc.h Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
miscstruct.h
nonsdk_extinit.h
opaque.h configurable maximum number of clients 2015-08-24 00:00:18 -07:00
optionstr.h
os.h Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
pixmap.h prime: add rotation support for offloaded outputs (v2) 2015-07-08 11:13:09 -07:00
pixmapstr.h prime: add rotation support for offloaded outputs (v2) 2015-07-08 11:13:09 -07:00
privates.h
probes.h
property.h dix: Remove redundant ChangeWindowProperty 2015-11-30 10:24:53 -05:00
propertyst.h
protocol-versions.h
ptrveloc.h
region.h
regionstr.h
registry.h
resource.h dix: export ResourceClientBits() 2015-09-01 20:11:26 -07:00
rgb.h
screenint.h
scrnintstr.h dix: Restore PaintWindow screen hook 2015-07-08 16:41:28 -04:00
selection.h
servermd.h dix: Fix image byte order on big endian hardware 2015-05-07 14:03:50 -04:00
site.h
swaprep.h dix: Unexport various implementation details 2015-07-08 16:40:57 -04:00
swapreq.h dix: Unexport various implementation details 2015-07-08 16:40:57 -04:00
systemd-logind.h
validate.h
version-config.h.in
vidmodestr.h vidmode: build without xf86vidmodeproto 2016-03-01 11:25:59 -05:00
window.h dix: Add hybrid full-size/empty-clip mode to SetRootClip 2016-02-22 13:26:31 -05:00
windowstr.h dix: unifdef pWin->rootlessUnhittable 2015-07-08 16:41:28 -04:00
xkb-config.h.in
xkbfile.h
xkbrules.h
xkbsrv.h xkb: after changing the keymap, force an indicator update 2016-05-04 10:55:09 -04:00
xkbstr.h
xorg-config.h.in Remove SIGIO support for input [v5] 2016-05-26 16:07:54 -07:00
xorg-server.h.in kdrive: Delete unused TOUCHSCREEN define. 2015-10-06 10:43:05 -04:00
xserver-properties.h
xsha1.h
xwin-config.h.in