[PATCH 2/4] X event queue mutex

Simon Thum simon.thum at gmx.de
Tue Oct 7 03:41:17 PDT 2008


Tiago Vignatti wrote:
> (Just to note: my last patch totally ignores the eventual races issues
> with input thread and input device properties)
I know, but it really should be in. Every input device has the "Enabled"
property, and changing it unprotected is just asking X to crash.
So the easy way out (only trivial props) isn't really an option anyway.

> Sh*t, the things are starting to get confused again. Keith was right
> saying that the IT needs only to worry with sprite updates, and we're
> _not_ doing this right now. The input thread covers all the input event
> generation stage and more other bits.
I think the IT has it's merits even without that. Though it would
definitely be cooler.

And I really think getting that right isn't actually hard, nor is it
much work. You could just change your mutex to suppress any processing
and expose it (maybe via OsBlock). Also make sure every main thread
miEnqueue() is done OsBlocked.

Should that turn out to stall too much, you can later have an extra
mutex to only suppress enqueuing (purely a performance optimization).

Cheers,

Simon



More information about the xorg mailing list