[PATCH 2/4] X event queue mutex
Keith Packard
keithp at keithp.com
Thu Oct 2 15:16:37 PDT 2008
On Thu, 2008-10-02 at 19:10 -0300, Tiago Vignatti wrote:
> Simon Thum escreveu:
> > I believe tiagos words are a bit misleading: The mutex makes it possible
> > to block event enqueuing, which is needed to guarantee order of events
> > enqueued on the main thread. If I got it right, the intent is to
> > 'emulate' OsBlockSignals(), though I'm missing that bit.
>
> Good point, Simon. I forgot about this discussion which we had in XDS.
>
> Given that there's only one thread to take care about all the input
> devices this would not be a problem with *devices*. Events will be
> serialized is this case. But the problems eventually can happen if the
> others guys that enqueue events (nested servers, DGA, maybe also XTest)
> try to do it at the same time with the devices. A mutex is needed in
> this situation.
Ah, yes indeed -- we need a mutex to protect writes to the tail pointer
in mieqEnqueue. But, not the tail reads from mieqProcessInputEvents.
That is what the signal blocking stuff was for, after all.
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20081002/1a1468d8/attachment.pgp>
More information about the xorg
mailing list