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
busfault.h
Trap SIGBUS to handle truncated shared memory segments
2013-11-11 15:16:07 -08:00
callback.h
Avoid starting a comment with */*
2014-07-17 10:19:52 -07:00
client.h
closestr.h
Replace 'pointer' type with 'void *'
2014-01-12 10:24:11 -08:00
closure.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
colormap.h
dix: Unexport various implementation details
2015-07-08 16:40:57 -04:00
colormapst.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
cursor.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
cursorstr.h
cursor: drop ARGB_CURSOR
2015-06-30 12:17:51 +10:00
dbus-core.h
xfree86: drop double-typedef of DBusConnection
2014-11-12 10:25:00 +10:00
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
dix: Remove redundant declarations.
2012-05-14 13:31:00 +01:00
dixfont.h
dixfont.h: Include fontutil.h before GetGlyphs is #defined
2015-08-17 18:50:00 -07:00
dixfontstr.h
dixfontstubs.h
include: GetClientResolutions is declared in font.h
2014-01-22 19:56:31 -08:00
dixgrabs.h
Avoid starting a comment with */*
2014-07-17 10:19:52 -07:00
dixstruct.h
Remove non-smart scheduler. Don't require setitimer.
2015-12-01 13:54:54 -05:00
eventconvert.h
input: drop FP1616 macro
2012-11-19 12:12:23 +10:00
events.h
Add support for XI2.3: Pointer barrier events and releases.
2012-12-17 15:01:45 +10:00
eventstr.h
Input: Add focus-in event source
2015-11-24 11:36:34 +10:00
exevents.h
dix: Move DeviceFocusEvent from Xi into enterleave.c
2012-05-17 08:50:44 +10:00
extension.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
extinit.h
Make PseudoramiXExtensionInit() prototype more generally available
2015-03-16 16:56:17 +00:00
extnsionst.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
gc.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
gcstruct.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
globals.h
Clean up warnings in DIX
2014-01-12 10:14:49 -08:00
glx_extinit.h
glx: drop GLX_LIBS from X server and workaround sdksyms.
2012-07-25 23:30:53 -07:00
hotplug.h
config: Replace OdevAttributes linked list with struct
2014-07-17 17:10:48 -07:00
input.h
Create a threaded mechanism for input [v7]
2016-05-26 16:07:54 -07:00
inputstr.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
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
Makefile.am
vidmode: move to a separate library of its own
2016-02-29 16:29:01 -05:00
misc.h
Create a threaded mechanism for input [v7]
2016-05-26 16:07:54 -07:00
miscstruct.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
nonsdk_extinit.h
Make PseudoramiXExtensionInit() prototype more generally available
2015-03-16 16:56:17 +00:00
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
Replace 'pointer' type with 'void *'
2014-01-12 10:24:11 -08:00
probes.h
Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe calls
2015-02-10 18:14:44 -08:00
property.h
dix: Remove redundant ChangeWindowProperty
2015-11-30 10:24:53 -05:00
propertyst.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
protocol-versions.h
randr: Add Monitor support (v1.1)
2015-03-31 12:32:04 +10:00
ptrveloc.h
dix: indentation fixes for pointer acceleration
2012-05-16 10:59:35 +10:00
region.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
regionstr.h
dix: make RegionInit legal C++
2015-01-23 10:35:49 -08:00
registry.h
XSERVER_DTRACE needs request names from registry too
2014-09-22 12:00:46 -07:00
resource.h
dix: export ResourceClientBits()
2015-09-01 20:11:26 -07:00
rgb.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
screenint.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
scrnintstr.h
dix: Restore PaintWindow screen hook
2015-07-08 16:41:28 -04:00
selection.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
servermd.h
dix: Fix image byte order on big endian hardware
2015-05-07 14:03:50 -04:00
site.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
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
systemd-logind: let the logind code decided whether to close an fd
2014-05-05 07:26:33 +10:00
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
XIstubs.h
xkb-config.h.in
xkbfile.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
xkbrules.h
xkb: add a call to init an XkbRMLVOSet from const chars
2014-02-04 10:53:59 +10:00
xkbsrv.h
xkb: after changing the keymap, force an indicator update
2016-05-04 10:55:09 -04:00
xkbstr.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
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
Xprintf.h
os/xprintf: add Xvscnprintf and Xscnprintf
2012-05-03 14:59:23 +10:00
xserver-properties.h
Add missing labels for multitouch valuators
2012-10-30 15:11:10 +10:00
xsha1.h
Drop trailing whitespaces
2014-11-12 10:25:00 +10:00
xwin-config.h.in
configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is used
2014-06-02 13:07:46 +01:00