opnsense-src/sys/dev/syscons
Warner Losh d708737568 APM was calling the suspend process from a timeout. This meant that
other timeouts could not happen while suspending, including timeouts
for things like msleep.  This caused the system to hang on suspend
when the cbb was enabled, since its suspend path powered down the
socket which used a timeout to wait for it to be done.

APM now creates a thread when it is enabled, and deletes the thread
when it is disabled.  This thread takes the place of the timeout by
doing its polling every ~.9s.  When the thread is disabled, it will
wakeup early, otherwise it times out and polls the varius things the
old timeout polled (APM events, suspend delays, etc).

This makes my Sony VAIO 505TS suspend/resume correctly when APM is
enabled (ACPI is black listed on my 505TS).

This will likely fix other problems with the suspend path where
drivers would sleep with msleep and/or do other timeouts.  Maybe
there's some special case code that would use DELAY while suspending
and msleep otherwise that can be revisited and removed.

This was also tested by glebius@, who pointed out that in the patch I
sent him, I'd forgotten apm_saver.c

MFC After: 3 weeks
2006-05-25 23:06:38 +00:00
..
apm APM was calling the suspend process from a timeout. This meant that 2006-05-25 23:06:38 +00:00
blank
daemon - Mask an underline attribute on the pc98 console. It enables to use the same 2005-05-15 08:59:00 +00:00
dragon Use the clear function provided by the video adapter driver. 2003-07-21 13:04:54 +00:00
fade Remove unused variable(s). 2003-05-31 20:29:34 +00:00
fire Use the clear function provided by the video adapter driver. 2003-07-21 13:04:54 +00:00
green
logo Use the clear function provided by the video adapter driver. 2003-07-21 13:04:54 +00:00
rain chase more of the MIN/MAX mess. *sigh* 2003-02-02 13:52:25 +00:00
snake Remove old epson note support. 2005-05-15 09:07:42 +00:00
star - Add color tables for 16 colors mode and 8 colors mode, use a different 2005-05-15 09:07:04 +00:00
warp Use the clear function provided by the video adapter driver. 2003-07-21 13:04:54 +00:00
scgfbrndr.c Add a font width argument to vi_load_font_t, vi_save_font_t and vi_putm_t 2005-09-28 14:54:07 +00:00
schistory.c Fix -Wundef. 2005-12-04 02:12:43 +00:00
scmouse.c Add a font width argument to vi_load_font_t, vi_save_font_t and vi_putm_t 2005-09-28 14:54:07 +00:00
scterm-dumb.c Fix -Wundef. 2005-12-04 02:12:43 +00:00
scterm-sc.c Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
scterm.c Use __FBSDID(). 2003-08-24 18:17:24 +00:00
sctermvar.h Do not try to work around ``poor (un)sign extension code'' 2002-10-20 22:50:13 +00:00
scvesactl.c Send the pcvt(4) driver off to retirement. 2006-05-17 09:33:15 +00:00
scvgarndr.c Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
scvidctl.c Add a font width argument to vi_load_font_t, vi_save_font_t and vi_putm_t 2005-09-28 14:54:07 +00:00
scvtb.c Remove superfluous braces and add #ifndef __sparc64__ around the 2005-05-21 20:28:15 +00:00
syscons.c Check the return code of sc_clean_up() in the only place where it 2006-05-12 22:43:07 +00:00
syscons.h Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
sysmouse.c Fix -Wundef. 2005-12-04 02:12:43 +00:00