diff options
author | yokota <yokota@FreeBSD.org> | 1997-07-15 14:43:27 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1997-07-15 14:43:27 +0000 |
commit | 56b7c76d791c0e3042285bea5b2d6dd85c0da4ab (patch) | |
tree | b02771683264bcd74b0f3decf0b85fa4f2acebc0 /sys/isa/syscons.h | |
parent | ea8e345c88167073264bb0f7d3a65f9b83754e51 (diff) | |
download | FreeBSD-src-56b7c76d791c0e3042285bea5b2d6dd85c0da4ab.zip FreeBSD-src-56b7c76d791c0e3042285bea5b2d6dd85c0da4ab.tar.gz |
Screen saver related fixes.
1. Add new interface, add_scrn_saver()/remove_scrn_saver(), to declare
loading/unloading of a screen saver. The screen saver calls these
functions to notify syscons of loading/unloading events.
It was possible to load multiple savers each of which will try to
remember the previous saver in a local variable (`old_saver'). The
scheme breaks easily if the user load two savers and unload them in a
wrong order; if the first saver is unloaded first, `old_saver' in the
second saver points to nowhere.
Now only one screen saver is allowed in memory at a time.
Soeren will be looking into this issue again later. syscons is
becoming too heavy. It's time to cut things down, rather than adding
more...
2. Make scrn_timer() to be the primary caller of the screen saver
(*current_saver)(). scintr(), scioctl() and ansi_put() update
`scrn_time_stamp' to indicate that they want to stop the screen saver.
There are three exceptions, however.
One is remove_scrn_saver() which need to stop the current screen saver
if it is running. To guard against scrn_timer() calling the saver during
this operation, `current_saver' is set to `none_saver' early.
The others are sccngetc() and sccncheckc(); they will unblank the
screen too. When the kernel enters DDB (via the hot key or a
break point), the screen saver will be stopped by sccngetc().
However, we have a reentrancy problem here. If the system has been in
the middle of the screen saver...
(The screen saver reentrancy problem has always been with sccnputc()
and sccngetc() in the -current source. So, the new code is doing no
worse, I reckon.)
3. Use `mono_time' rather than `time'.
4. Make set_border() work for EGA and CGA in addition to VGA. Do
nothing for MDA.
Changes to the LKM screen saver modules will follow shortly. YOU NEED
TO RECOMPILE BOTH SCREEN SAVERS AND KERNEL AS OF THESE CHANGES.
Reviewed by: sos and bde
Diffstat (limited to 'sys/isa/syscons.h')
-rw-r--r-- | sys/isa/syscons.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/isa/syscons.h b/sys/isa/syscons.h index 7d46410..78703f7 100644 --- a/sys/isa/syscons.h +++ b/sys/isa/syscons.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.h,v 1.29 1997/05/15 05:43:59 yokota Exp $ + * $Id: syscons.h,v 1.30 1997/06/29 15:11:40 yokota Exp $ */ #ifndef _I386_ISA_SYSCONS_H_ @@ -196,5 +196,7 @@ void set_border(u_char color); void set_mode(scr_stat *scp); void copy_font(int operation, int font_type, char* font_image); void load_palette(char *palette); +int add_scrn_saver(void (*this)(int)); +int remove_scrn_saver(void (*this)(int)); #endif /* !_I386_ISA_SYSCONS_H_ */ |