[PATCH/RFC] xfree86: add a hook to replace the new console handler.

Adam Jackson ajax at nwnk.net
Wed Sep 8 08:59:59 PDT 2010


On Mon, 2010-09-06 at 11:56 +1000, Peter Hutterer wrote:
> This hook is only necessary for the keyboard driver to remove the race
> condition between drain_console() and the driver's ReadInput (Bug 29969).
> 
> The idea is that a driver that needs to handle events from the console
> calls xf86ReplaceConsoleHandler() with it's own ReadInput (or NULL) and thus
> removes the drain_console call. It's the driver's responsibility to restore
> the previous behaviour when the driver is unloaded.

You may want to note that "(or NULL)" bit in the comment above
xf86SetConsoleHandler, since otherwise you have to drill down to
addInputHandler to figure it out.  Likewise the if (old_handler) is
redundant.

Just cosmetics though.

Reviewed-by: Adam Jackson <ajax at redhat.com>

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100908/2e39fb51/attachment.pgp>


More information about the xorg-devel mailing list