xserver/hw/dmx
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
..
config dmx: Silence unused variable warning in dmxcompat 2015-12-08 18:20:13 -05:00
doc dmx: fix typo in the title 2015-09-23 10:39:47 -04:00
doxygen dmx: Run 'doxygen -u' to upgrade the doxygen config file 2015-12-08 18:20:14 -05:00
examples Fix formatting of address operators 2012-12-05 18:09:48 -06:00
glxProxy dmx/glxProxy: don't free the glx pixmap twice if AddResource fails 2016-03-08 10:19:51 -05:00
input Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
man dmx: Remove ShadowFB support 2013-09-10 13:28:23 -04:00
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am Build fbcmap_mi.c once, rather than once for each DDX 2014-03-27 14:34:06 +00:00
dmx-config.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmx.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmx.h dmx: Remove ShadowFB support 2013-09-10 13:28:23 -04:00
dmx_glxvisuals.c glx: Correctly set render type enum 2013-10-24 11:16:30 -07:00
dmx_glxvisuals.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxcb.c dmx: remove redundant redeclarations of variables from other headers 2015-02-10 18:14:44 -08:00
dmxcb.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxclient.h Bunch of DMX warning fixes 2014-01-12 10:14:49 -08:00
dmxcmap.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxcmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxcursor.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxcursor.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxdpms.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxdpms.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxextension.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxextension.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxfont.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxfont.h dmx: remove redundant declaration of dmxFontPrivateIndex from dmxfont.h 2015-02-10 18:14:44 -08:00
dmxgc.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxgc.h dmx: constify GCOps & GCFuncs pointers 2015-02-10 18:14:45 -08:00
dmxgcops.c mi: Drop plane argument from miHandleExposures 2014-10-09 11:14:53 +02:00
dmxgcops.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxinit.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxinit.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxinput.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxinput.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxlog.c dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURN 2012-05-01 11:36:35 +10:00
dmxlog.h dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURN 2012-05-01 11:36:35 +10:00
dmxpict.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxpict.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
dmxpixmap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxpixmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxprop.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxprop.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxscrinit.c dmx: remove unused variables 2015-02-10 18:14:44 -08:00
dmxscrinit.h api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
dmxstat.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxstat.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxsync.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxsync.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxvisual.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxvisual.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxwindow.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxwindow.h dix: Drop the third argument from WindowExposuresProcPtr 2014-10-09 11:14:44 +02:00