xserver-multidpi/hw/xfree86/os-support
Tomáš Trnka 323869f329 Fix drain_console unregistration
Bug introduced by 9dca441670
xfree86: add a hook to replace the new console handler.

console_handler was not being set, making the server eat up CPU spinning
in WaitForSomething selecting consoleFd over and over again, every time
trying to unregister drain_console without success due to
console_handler being NULL.

Let's just fix the unregistration in xf86SetConsoleHandler() and use that.

But wait, there could be a catch: If some driver replaced the handler using
xf86SetConsoleHandler(), the unregistration in xf86CloseConsole will unregister
that one. I don't understand Xorg well enough to know whether this poses a
problem (could mess up driver deinit somehow or something like that). As it is,
xf86SetConsoleHandler() doesn't offer any way to prevent this (i.e. check which
handler is currently registered).

I had been using it for two days on my machine that previously hit 100% CPU
several times a day. That has now gone away without any new problems appearing.

Signed-off-by: Tomas Trnka <tomastrnka@gmx.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-18 09:15:54 +10:00
..
bsd bsd: ioctl KDENABIO/KDDISABIO do not matter for OpenBSD 2011-09-29 23:05:35 +06:00
bus xfree86: bus: assign PCI_SOURCES with the actual source files 2010-09-14 18:53:23 +03:00
hurd Do not trap access to timer and keyboard 2010-11-10 14:42:44 -08:00
linux Fix drain_console unregistration 2011-10-18 09:15:54 +10:00
misc Fix breakage on alpha caused by c7680befe5 2009-10-06 20:58:30 -04:00
shared xfree86: switch options from pointer to XF86OptionPtr 2011-09-27 11:43:36 +10:00
solaris sun_init.c: Implement novtswitch & sharevts for Solaris 2011-09-19 15:34:54 -07:00
int10Defines.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Makefile.am Don't use empty source files 2011-06-23 05:28:31 -07:00
xf86_OSlib.h Remove unused vtSysreq 2011-09-29 23:05:35 +06:00
xf86_OSproc.h xfree86: switch options from pointer to XF86OptionPtr 2011-09-27 11:43:36 +10:00
xf86OSpriv.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00