[PATCH 2/2] mi: Log an error if mieqProcessInputEvents() recurses.

Keith Packard keithp at keithp.com
Fri Jun 15 16:27:42 PDT 2012


Jeremy Huddleston <jeremyhu at apple.com> writes:


> Can you please put the XQuartz mutex lock inside of the
> inProcessInputEvents grab/release.  I know the number of instructions
> is small, but there's no reason to hold the lock when checking or
> setting inProcessInputEvents.  It's a mutex on miEventQueue.

Uh. That would require that the test/set of the inProcessInputEvents be
atomic; placing that test inside the mutex ensures that the check works
correctly.

I know it would 'probably' work just fine, but it's not nice to see
obviously incorrect code like that lying around.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120615/459467dc/attachment.pgp>


More information about the xorg-devel mailing list