[PATCH 2/4] X event queue mutex

Jeremy Huddleston jeremyhu at freedesktop.org
Fri Nov 7 13:26:13 PST 2008


On Nov 7, 2008, at 12:23, Tiago Vignatti wrote:
>> For this reason, I went back to locking inside  
>> mieqProcessInputEvents with XQUARTZ.
>
> Your mutex will lags your cursor update on screen because the input  
> thread will block before enqueuing while the main thread pops  
> events. On this case try to keep the lock near the critical region  
> on mieqPIE, avoiding coarse grained locking.
>
>
> Cheers,
>
> PS: this problem of the event queue being processed by more then one  
> user shows how multi-threaded applications suck so much to program.  
> Moreover, if you try to use gdb to debug then you'll see the crazy  
> world that we're living.

Yeah, that's pretty much what it's doing now in the xorg-server-1.4- 
apple branch... the one thing I don't like is that screensaver  
block... can that be moved to after we copy the event (to lessen the  
lock time) or is there some reason that I don't see that it's first?

--Jeremy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3221 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20081107/39cb50a2/attachment.bin>


More information about the xorg mailing list