Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons add vcons_hard_switch, for switching w/o call...
details: https://anonhg.NetBSD.org/src/rev/c53a3b0751d4
branches: trunk
changeset: 762260:c53a3b0751d4
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Feb 18 13:56:11 2011 +0000
description:
add vcons_hard_switch, for switching w/o callouts (eg. entering ddb)
diffstat:
sys/dev/wscons/wsdisplay_vcons.c | 22 ++++++++++++++++++++--
sys/dev/wscons/wsdisplay_vconsvar.h | 3 ++-
2 files changed, 22 insertions(+), 3 deletions(-)
diffs (56 lines):
diff -r 52a9d966c34f -r c53a3b0751d4 sys/dev/wscons/wsdisplay_vcons.c
--- a/sys/dev/wscons/wsdisplay_vcons.c Fri Feb 18 13:56:03 2011 +0000
+++ b/sys/dev/wscons/wsdisplay_vcons.c Fri Feb 18 13:56:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_vcons.c,v 1.23 2011/02/09 13:19:18 jmcneill Exp $ */
+/* $NetBSD: wsdisplay_vcons.c,v 1.24 2011/02/18 13:56:11 jmcneill Exp $ */
/*-
* Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.23 2011/02/09 13:19:18 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.24 2011/02/18 13:56:11 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1479,3 +1479,21 @@
atomic_inc_uint(&scr->scr_dirty);
#endif
}
+
+void
+vcons_hard_switch(struct vcons_screen *scr)
+{
+ struct vcons_data *vd = scr->scr_vd;
+ struct vcons_screen *oldscr = vd->active;
+
+ if (oldscr) {
+ SCREEN_INVISIBLE(oldscr);
+ oldscr->scr_ri.ri_flg &= ~RI_CURSOR;
+ }
+ SCREEN_VISIBLE(scr);
+ vd->active = scr;
+ vd->wanted = NULL;
+
+ if (vd->show_screen_cb != NULL)
+ vd->show_screen_cb(scr);
+}
diff -r 52a9d966c34f -r c53a3b0751d4 sys/dev/wscons/wsdisplay_vconsvar.h
--- a/sys/dev/wscons/wsdisplay_vconsvar.h Fri Feb 18 13:56:03 2011 +0000
+++ b/sys/dev/wscons/wsdisplay_vconsvar.h Fri Feb 18 13:56:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_vconsvar.h,v 1.17 2011/02/09 13:19:19 jmcneill Exp $ */
+/* $NetBSD: wsdisplay_vconsvar.h,v 1.18 2011/02/18 13:56:11 jmcneill Exp $ */
/*-
* Copyright (c) 2005, 2006 Michael Lorenz
@@ -177,5 +177,6 @@
void vcons_enable_polling(struct vcons_data *);
void vcons_disable_polling(struct vcons_data *);
+void vcons_hard_switch(struct vcons_screen *);
#endif /* _WSDISPLAY_VCONS_H_ */
Home |
Main Index |
Thread Index |
Old Index