[PATCH 1/2] xfree86: use a thread for the generation of input events

Adam Jackson ajax at redhat.com
Thu Dec 16 07:32:21 PST 2010


On Wed, 2010-12-15 at 23:08 +0100, Mark Kettenis wrote:

> Yes, that is the additional locking that's necessary.  I'd say you'll
> need a mutex that you lock in x86BlockSIGIO() and unlock in
> xf86UnblockSIGIO() and lock/unlock around each event that you process
> in the input thread.

It's more subtle than that.  BlockSIGIO is used to mean both "suppress
input because I'm changing the input state", and "suppress signals
because I don't want my usleep()s to wake up early".  So you really need
as a first pass to change the callers to say what they mean, and the
former case should be xf86BlockInput (which then happens to call
BlockSIGIO for now, but turns into a mutex in the threading change).

Untangling that is proving slightly more interesting than I expected,
but I should have a handle on it momentarily.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101216/4ad5235b/attachment.pgp>


More information about the xorg-devel mailing list