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

Jeremy Huddleston jeremyhu at apple.com
Fri Jun 15 23:42:45 PDT 2012

On Jun 15, 2012, at 4:27 PM, Keith Packard <keithp at keithp.com> wrote:

> 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;

True.  I'll change that as a followup down the road.

> 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

More information about the xorg-devel mailing list