[PATCH 2/4] X event queue mutex

Keith Packard keithp at keithp.com
Wed Oct 1 17:47:29 PDT 2008


On Wed, 2008-10-01 at 21:39 -0300, Tiago Vignatti wrote:

> A mutex is needed because the X event queue is a critical region. Though
> the X event queue is re-entrant, we cannot guarantee the simultaneous
> processing by both main and input threads.

The input queue is written so that each user modifies only one of the
two pointers (head and tail). There shouldn't be any need to have a
mutex which protects both of these values together, and doing so
prevents mouse motion while the server is processing events.

Is there something fundamentally different between threaded input and
SIGIO- or kernel-based input that I'm missing here?

-- 
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/20081001/4b9f1b9b/attachment.pgp>


More information about the xorg mailing list