xserver-multidpi/os/Makefile.am
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

61 lines
1.1 KiB
Makefile

noinst_LTLIBRARIES = libos.la
AM_CFLAGS = $(DIX_CFLAGS) $(SHA1_CFLAGS)
SECURERPC_SRCS = rpcauth.c
XDMCP_SRCS = xdmcp.c
XORG_SRCS = log.c
BUSFAULT_SRCS = busfault.c
libos_la_SOURCES = \
WaitFor.c \
access.c \
auth.c \
backtrace.c \
client.c \
connection.c \
inputthread.c \
io.c \
mitauth.c \
oscolor.c \
osdep.h \
osinit.c \
utils.c \
xdmauth.c \
xsha1.c \
xstrans.c \
xprintf.c \
$(XORG_SRCS)
libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS) $(LTLIBOBJS)
if SECURE_RPC
libos_la_SOURCES += $(SECURERPC_SRCS)
endif
if XDMCP
libos_la_SOURCES += $(XDMCP_SRCS)
endif
if HAVE_LIBUNWIND
AM_CFLAGS += $(LIBUNWIND_CFLAGS)
libos_la_LIBADD += $(LIBUNWIND_LIBS)
endif
if BUSFAULT
libos_la_SOURCES += $(BUSFAULT_SRCS)
endif
EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS)
if SPECIAL_DTRACE_OBJECTS
# Generate dtrace object code for probes in libos & libdix
dtrace.o: $(top_srcdir)/dix/Xserver.d $(am_libos_la_OBJECTS)
$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o ../dix/.libs/*.o
noinst_PROGRAMS = os.O
os_O_SOURCES =
os.O: dtrace.o $(am_libos_la_OBJECTS)
$(AM_V_GEN)ld -r -o $@ dtrace.o .libs/*.o
endif