xserver-multidpi/mi
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
..
Makefile.am mi: Fold micursor.c into mipointer.c 2014-10-27 15:45:29 -04:00
mi.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
miarc.c mi: Correct a miscall of abs() to instead call fabs() 2015-10-19 11:49:52 -04:00
mibitblt.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
micmap.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
micmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
micoord.h mi: Remove semi-arbitrary arch awareness in packed coordinate macros 2014-07-28 12:20:44 -07:00
micopy.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
midash.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
midispcur.c cursor: drop ARGB_CURSOR 2015-06-30 12:17:51 +10:00
mieq.c Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
miexpose.c dix: Restore PaintWindow screen hook 2015-07-08 16:41:28 -04:00
mifillarc.c mi: Partial pie-slice filled arcs may need more space for spans 2015-04-13 18:41:26 -07:00
mifillarc.h mi: Unexport arc fill implementation details 2014-10-27 15:45:21 -04:00
mifillrct.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
mifpoly.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
migc.c dix: Always store GC client clip as a region (v2) 2014-10-27 15:46:05 -04:00
migc.h Clean up a few function prototypes to not place formals in /**/ 2014-01-12 10:24:12 -08:00
miglblt.c dix: Unexport various implementation details 2015-07-08 16:40:57 -04:00
miinitext.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
miline.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
mioverlay.c mioverlay.c: remove shadowed pScreen. 2015-08-17 18:23:40 -07:00
mioverlay.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
mipointer.c Remove SIGIO support for input [v5] 2016-05-26 16:07:54 -07:00
mipointer.h xwayland: Move sprite invalidation logic into mipointer 2016-05-25 11:00:56 -04:00
mipointrst.h mi: Remove miPointerRec from API 2016-05-25 11:05:37 -04:00
mipoly.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
mipoly.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
mipolypnt.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
mipolyrect.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
mipolyseg.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
mipolytext.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
mipushpxl.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
miscanfill.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
miscrinit.c dix: Restore PaintWindow screen hook 2015-07-08 16:41:28 -04:00
misprite.c mi: Fix block handler wrapping in miSprite 2014-07-17 11:17:20 -07:00
misprite.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
mistruct.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
mivalidate.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
mivaltree.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
miwideline.c mi: Always initialize edge1 and edge2 in miLineArc 2015-08-17 18:50:25 -07:00
miwideline.h mi: Fold mispans.c into miwideline.c 2014-10-27 15:45:22 -04:00
miwindow.c dix: Restore PaintWindow screen hook 2015-07-08 16:41:28 -04:00
mizerarc.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
mizerarc.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
mizerclip.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
mizerline.c Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00