xserver/hw/xfree86/os-support
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
..
bsd Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
bus Replace 'sun' with '__sun' 2015-11-30 11:51:22 -05:00
hurd Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
linux systemd-logind.c: don't parse VT settings for non-seat0 X servers 2015-12-08 11:54:11 -05:00
misc Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
shared Create a threaded mechanism for input [v7] 2016-05-26 16:07:54 -07:00
solaris Remove apSolaris.shar (old "aperture" kernel driver for Solaris) 2015-04-21 16:57:07 -07:00
stub xfree86: Remove xf86ReadBIOS 2014-09-16 11:58:53 -04:00
Makefile.am xfree86: Add stubs for os-support to help adding new architecture support 2011-10-15 21:18:47 -07:00
int10Defines.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
xf86OSpriv.h xfree86: Remove xf86LinearVidMem 2014-09-16 11:58:53 -04:00
xf86_OSlib.h Replace 'sun' with '__sun' 2015-11-30 11:51:22 -05:00
xf86_OSproc.h Remove SIGIO support for input [v5] 2016-05-26 16:07:54 -07:00