reentrancy of mieqProcessInputEvents()?

Keith Packard keithp at keithp.com
Tue Jun 12 17:38:39 PDT 2012


Andy Ritger <aritger at nvidia.com> writes:

> Is mi/mieq.c:mieqProcessInputEvents() expected to be reentrant?  Or should
> mieqProcessInputEvents() never be called in that situation?

It should never be re-entered; probably would be a good idea to check
for that and whinge loudly in the log.

> (g) Someone in the pScrnInfo->SwitchMode wrap chain calls RRTellChanged()
>     (in my case, it is the NVIDIA X driver, but I think many
>     drivers could be exposed to this through xf86SetSingleMode() ->
>     xf86RandR12TellChanged()) which calls UpdateCurrentTime().

This function needs to use UpdateCurrentTimeIf to avoid recursing.

> Making the 'event' variable in mieqProcessInputEvents() non-static
> avoids the FatalError() in FixKeyState(), but is it problematic to
> have the re-entered instance of mieqProcessInputEvents() process events
> from miEventQueue before the first instance of mieqProcessInputEvents()
> has completed processing of its current event?

Yeah, that's not a good plan.

-- 
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/20120612/c0d11526/attachment.pgp>


More information about the xorg-devel mailing list