xserver/hw/xfree86/common
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
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am xfree86: switch options from pointer to XF86OptionPtr 2011-09-27 11:43:36 +10:00
compiler.h Remove SCO support 2010-12-20 12:11:11 -05:00
extramodes
fourcc.h
modeline2c.awk Remove some OS/2 leftovers. 2009-04-06 10:58:47 -04:00
vesamodes
vidmodeproc.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86.h Merge remote-tracking branch 'whot/next' 2011-09-26 20:24:15 -07:00
xf86AutoConfig.c config: warning fixes 2010-12-31 12:36:44 +00:00
xf86Build.h.in
xf86Bus.c xfree86: Remove xf86EnterServerState 2010-12-20 12:14:32 -05:00
xf86Bus.h xfree86: bus: remove useless field from EntityRec 2010-05-24 19:17:04 +03:00
xf86Config.c Merge remote-tracking branch 'herrb/master' 2011-10-03 13:56:06 -07:00
xf86Config.h xfree86: "Staticize" functions in xf86AutoConfig.c 2009-07-24 13:25:42 +03:00
xf86Configure.c Terminate the log with one last message. 2011-07-27 09:31:02 +10:00
xf86Cursor.c xfree86: Remove xf86EnterServerState 2010-12-20 12:14:32 -05:00
xf86DGA.c xfree86/dga: Remove DGAIsDgaEvent() 2011-01-27 14:22:03 +10:00
xf86DPMS.c Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
xf86Events.c Fix drain_console unregistration 2011-10-18 09:15:54 +10:00
xf86Globals.c Merge remote-tracking branch 'herrb/master' 2011-10-03 13:56:06 -07:00
xf86Helper.c Merge remote-tracking branch 'whot/next' 2011-09-26 20:24:15 -07:00
xf86InPriv.h xfree86: make xf86ActivateDevice static. 2010-09-01 15:26:47 +10:00
xf86Init.c Merge remote-tracking branch 'whot/next' 2011-09-26 20:24:15 -07:00
xf86Mode.c xf86ValidateModes: xnfalloc(strlen) + strcpy => xnfstrdup 2010-11-30 16:25:10 -08:00
xf86Module.h Input: Widen pointer acceleration types to double 2011-09-29 12:24:33 +10:00
xf86Opt.h xfree86: switch options from pointer to XF86OptionPtr 2011-09-27 11:43:36 +10:00
xf86Option.c xfree86: switch options from pointer to XF86OptionPtr 2011-09-27 11:43:36 +10:00
xf86Optionstr.h xfree86: switch options from pointer to XF86OptionPtr 2011-09-27 11:43:36 +10:00
xf86PM.c xfree86: Remove xf86EnterServerState 2010-12-20 12:14:32 -05:00
xf86PciInfo.h
xf86Priv.h Terminate the log with one last message. 2011-07-27 09:31:02 +10:00
xf86Privstr.h Remove unused vtSysreq 2011-09-29 23:05:35 +06:00
xf86RandR.c xfree86: replace two inputInfo.pointer uses with device loops. 2011-02-22 14:35:44 +10:00
xf86ShowOpts.c Terminate the log with one last message. 2011-07-27 09:31:02 +10:00
xf86VGAarbiter.c Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" 2011-03-17 23:48:52 -07:00
xf86VGAarbiter.h xfree86: vgaarb: fix device decoding interface to send resources type properly 2010-08-26 18:17:12 +03:00
xf86VGAarbiterPriv.h Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" 2011-03-17 23:48:52 -07:00
xf86VidMode.c xf86vidmode: warning fix 2011-02-08 12:40:14 -05:00
xf86Xinput.c Merge remote-tracking branch 'herrb/master' 2011-10-03 13:56:06 -07:00
xf86Xinput.h input: switch InitValuatorAxisStruct to return Bool 2011-09-29 12:26:43 +10:00
xf86cmap.c Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998 2010-07-13 09:58:04 -07:00
xf86cmap.h Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
xf86fbBus.c xserver: remove RAC/resource handling code. 2009-07-28 15:14:28 +10:00
xf86fbman.c Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
xf86fbman.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86noBus.c xserver: remove RAC/resource handling code. 2009-07-28 15:14:28 +10:00
xf86pciBus.c Convert alloc+sprintf pairs into asprintf() & XNFasprintf() calls 2010-12-07 11:10:35 -08:00
xf86pciBus.h xfree86: configure: move buses references to their own location 2010-09-14 18:51:59 +03:00
xf86sbusBus.c xfree86: Fix undefined reference to `XNFsprintf' on sparc. 2011-02-23 14:44:23 +01:00
xf86sbusBus.h xfree86: configure: move buses references to their own location 2010-09-14 18:51:59 +03:00
xf86str.h xfree86: Remove xf86EnterServerState 2010-12-20 12:14:32 -05:00
xf86xv.c xfree86: xv: set pointers to NULL in xf86XVFreeAdaptor 2011-04-07 19:57:08 +03:00
xf86xv.h xf86/xv: Fill color key on expose 2011-02-03 14:38:10 +02:00
xf86xvmc.c Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
xf86xvmc.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86xvpriv.h xf86/xv: Use PostValidateTree to do reput 2011-02-03 14:38:36 +02:00
xisb.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
xisb.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xorgHelper.c xfree86: ANSI cleanups 2009-01-11 08:54:11 +01:00
xorgVersion.h