[PATCH 5/5] input: use a thread for the generation of input events

Tiago Vignatti tiago.vignatti at nokia.com
Fri Dec 17 05:24:38 PST 2010


On Thu, Dec 16, 2010 at 03:31:40PM -0500, ext Adam Jackson wrote:
> From: Tiago Vignatti <tiago.vignatti at nokia.com>
> 
> If configured, and enabled at runtime, use a separate thread for
> handling input devices.  Use pipes to communicate plug events from main
> thread to input thread, and to communicate event queue updates from
> input thread to main thread.
> 
> For the xfree86 DDX, change the SIGIO handler to simply raise enough of
> a dispatch exception to make the main loop interrupt request processing
> and return to input processing.  This has no effect when the input
> thread is active but is a minor optimization when it's not.
> 
> v2:
> - Fix memory leak in InputThreadUnregisterDev
> - Fix build with --disable-input-thread

you left MaxInputDevices out of the disabling macro.

Also, I liked in the previous patchset when you used the second commit to
explain that now we have two input processing methods:

- input thread
- main loop dispatch
 
where the SIGIO handler is merely an optimization for the second case.

I'd say to attach this kind of information somewhere in the code, which would
help a lot upcoming developers.

Thanks

        Tiago


More information about the xorg-devel mailing list