xserver/hw/dmx/input
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
..
ChkNotMaskEv.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
ChkNotMaskEv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Makefile.am dmx: purge DMX EQ leftovers 2009-09-13 10:30:17 +10:00
atKeynames.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxarg.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxarg.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxbackend.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxbackend.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxcommon.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxcommon.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxconsole.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxconsole.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxdetach.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxdummy.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxdummy.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxevents.c Remove SIGIO support for input [v5] 2016-05-26 16:07:54 -07:00
dmxevents.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxinputinit.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxinputinit.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dmxmap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxmotion.c Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
dmxmotion.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dmxsigio.c Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
dmxsigio.h Drop custom sigio block/unblock functions from kdrive, ephyr and dmx 2012-07-03 15:56:35 +10:00
dmxxinput.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
lnx-keyboard.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
lnx-keyboard.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
lnx-ms.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
lnx-ms.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
lnx-ps2.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
lnx-ps2.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
usb-common.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
usb-common.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
usb-keyboard.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
usb-keyboard.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
usb-mouse.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
usb-mouse.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
usb-other.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
usb-other.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
usb-private.h dmx: provide enough space for axis mappings 2013-09-25 03:52:54 +10:00