Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Call cnpollc(9) before cngetc(9) as the cons(9) man...



details:   https://anonhg.NetBSD.org/src/rev/d6898a347719
branches:  trunk
changeset: 1023758:d6898a347719
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Sep 25 19:16:31 2021 +0000

description:
Call cnpollc(9) before cngetc(9) as the cons(9) man page says.

Affects only inside #ifdef DEBUG part on "trap during panic" in trap.c
derived from hp300.

diffstat:

 sys/arch/atari/atari/trap.c     |  9 ++++++---
 sys/arch/cesfic/cesfic/trap.c   |  9 ++++++---
 sys/arch/hp300/hp300/trap.c     |  9 ++++++---
 sys/arch/luna68k/luna68k/trap.c |  9 ++++++---
 sys/arch/mac68k/mac68k/trap.c   |  9 ++++++---
 sys/arch/mvme68k/mvme68k/trap.c |  9 ++++++---
 sys/arch/news68k/news68k/trap.c |  9 ++++++---
 sys/arch/next68k/next68k/trap.c |  9 ++++++---
 sys/arch/x68k/x68k/trap.c       |  9 ++++++---
 9 files changed, 54 insertions(+), 27 deletions(-)

diffs (270 lines):

diff -r e31b19dc7503 -r d6898a347719 sys/arch/atari/atari/trap.c
--- a/sys/arch/atari/atari/trap.c       Sat Sep 25 18:49:03 2021 +0000
+++ b/sys/arch/atari/atari/trap.c       Sat Sep 25 19:16:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.116 2019/11/21 19:23:59 ad Exp $    */
+/*     $NetBSD: trap.c,v 1.117 2021/09/25 19:16:31 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.116 2019/11/21 19:23:59 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.117 2021/09/25 19:16:31 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -277,7 +277,10 @@
                printf("Double panic\n");
 #ifdef DEBUG
                /* XXX Should be a machine dependent hook */
-               printf("(press a key)\n"); (void)cngetc();
+               printf("(press a key)\n");
+               cnpollc(1);
+               (void)cngetc();
+               cnpollc(0);
 #endif
        }
 
diff -r e31b19dc7503 -r d6898a347719 sys/arch/cesfic/cesfic/trap.c
--- a/sys/arch/cesfic/cesfic/trap.c     Sat Sep 25 18:49:03 2021 +0000
+++ b/sys/arch/cesfic/cesfic/trap.c     Sat Sep 25 19:16:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.60 2019/11/21 19:23:59 ad Exp $     */
+/*     $NetBSD: trap.c,v 1.61 2021/09/25 19:16:31 tsutsui Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.60 2019/11/21 19:23:59 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.61 2021/09/25 19:16:31 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -307,7 +307,10 @@
                        printf("trap during panic!\n");
 #ifdef DEBUG
                        /* XXX should be a machine-dependent hook */
-                       printf("(press a key)\n"); (void)cngetc();
+                       printf("(press a key)\n");
+                       cnpollc(1);
+                       (void)cngetc();
+                       cnpollc(0);
 #endif
                }
                regdump((struct trapframe *)fp, 128);
diff -r e31b19dc7503 -r d6898a347719 sys/arch/hp300/hp300/trap.c
--- a/sys/arch/hp300/hp300/trap.c       Sat Sep 25 18:49:03 2021 +0000
+++ b/sys/arch/hp300/hp300/trap.c       Sat Sep 25 19:16:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.154 2019/11/21 19:24:00 ad Exp $    */
+/*     $NetBSD: trap.c,v 1.155 2021/09/25 19:16:31 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.154 2019/11/21 19:24:00 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.155 2021/09/25 19:16:31 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -304,7 +304,10 @@
                        printf("trap during panic!\n");
 #ifdef DEBUG
                        /* XXX should be a machine-dependent hook */
-                       printf("(press a key)\n"); (void)cngetc();
+                       printf("(press a key)\n");
+                       cnpollc(1);
+                       (void)cngetc();
+                       cnpollc(0);
 #endif
                }
                regdump((struct trapframe *)fp, 128);
diff -r e31b19dc7503 -r d6898a347719 sys/arch/luna68k/luna68k/trap.c
--- a/sys/arch/luna68k/luna68k/trap.c   Sat Sep 25 18:49:03 2021 +0000
+++ b/sys/arch/luna68k/luna68k/trap.c   Sat Sep 25 19:16:31 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.72 2019/11/21 19:24:00 ad Exp $ */
+/* $NetBSD: trap.c,v 1.73 2021/09/25 19:16:31 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.72 2019/11/21 19:24:00 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.73 2021/09/25 19:16:31 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -273,7 +273,10 @@
                        printf("trap during panic!\n");
 #ifdef DEBUG
                        /* XXX should be a machine-dependent hook */
-                       printf("(press a key)\n"); (void)cngetc();
+                       printf("(press a key)\n");
+                       cnpollc(1);
+                       (void)cngetc();
+                       cnpollc(0);
 #endif
                }
                regdump((struct trapframe *)fp, 128);
diff -r e31b19dc7503 -r d6898a347719 sys/arch/mac68k/mac68k/trap.c
--- a/sys/arch/mac68k/mac68k/trap.c     Sat Sep 25 18:49:03 2021 +0000
+++ b/sys/arch/mac68k/mac68k/trap.c     Sat Sep 25 19:16:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.151 2020/08/10 10:51:21 rin Exp $   */
+/*     $NetBSD: trap.c,v 1.152 2021/09/25 19:16:31 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.151 2020/08/10 10:51:21 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.152 2021/09/25 19:16:31 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -286,7 +286,10 @@
                        printf("trap during panic!\n");
 #ifdef DEBUG
                        /* XXX should be a machine-dependent hook */
-                       printf("(press a key)\n"); (void)cngetc();
+                       printf("(press a key)\n");
+                       cnpollc(1);
+                       (void)cngetc();
+                       cnpollc(0);
 #endif
                }
                regdump((struct trapframe *)fp, 128);
diff -r e31b19dc7503 -r d6898a347719 sys/arch/mvme68k/mvme68k/trap.c
--- a/sys/arch/mvme68k/mvme68k/trap.c   Sat Sep 25 18:49:03 2021 +0000
+++ b/sys/arch/mvme68k/mvme68k/trap.c   Sat Sep 25 19:16:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.111 2019/11/21 19:24:00 ad Exp $    */
+/*     $NetBSD: trap.c,v 1.112 2021/09/25 19:16:31 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.111 2019/11/21 19:24:00 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.112 2021/09/25 19:16:31 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -327,7 +327,10 @@
                        printf("trap during panic!\n");
 #ifdef DEBUG
                        /* XXX should be a machine-dependent hook */
-                       printf("(press a key)\n"); (void)cngetc();
+                       printf("(press a key)\n");
+                       cnpollc(1);
+                       (void)cngetc();
+                       cnpollc(0);
 #endif
                }
                regdump((struct trapframe *)fp, 128);
diff -r e31b19dc7503 -r d6898a347719 sys/arch/news68k/news68k/trap.c
--- a/sys/arch/news68k/news68k/trap.c   Sat Sep 25 18:49:03 2021 +0000
+++ b/sys/arch/news68k/news68k/trap.c   Sat Sep 25 19:16:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.72 2019/11/21 19:24:00 ad Exp $     */
+/*     $NetBSD: trap.c,v 1.73 2021/09/25 19:16:31 tsutsui Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.72 2019/11/21 19:24:00 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.73 2021/09/25 19:16:31 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -296,7 +296,10 @@
                        printf("trap during panic!\n");
 #ifdef DEBUG
                        /* XXX should be a machine-dependent hook */
-                       printf("(press a key)\n"); (void)cngetc();
+                       printf("(press a key)\n");
+                       cnpollc(1);
+                       (void)cngetc();
+                       cnpollc(0);
 #endif
                }
                regdump((struct trapframe *)fp, 128);
diff -r e31b19dc7503 -r d6898a347719 sys/arch/next68k/next68k/trap.c
--- a/sys/arch/next68k/next68k/trap.c   Sat Sep 25 18:49:03 2021 +0000
+++ b/sys/arch/next68k/next68k/trap.c   Sat Sep 25 19:16:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.91 2019/11/21 19:24:01 ad Exp $     */
+/*     $NetBSD: trap.c,v 1.92 2021/09/25 19:16:31 tsutsui Exp $        */
 
 /*
  * This file was taken from mvme68k/mvme68k/trap.c
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.91 2019/11/21 19:24:01 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.92 2021/09/25 19:16:31 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -314,7 +314,10 @@
                        printf("trap during panic!\n");
 #ifdef DEBUG
                        /* XXX should be a machine-dependent hook */
-                       printf("(press a key)\n"); (void)cngetc();
+                       printf("(press a key)\n");
+                       cnpollc(1);
+                       (void)cngetc();
+                       cnpollc(0);
 #endif
                }
                regdump((struct trapframe *)fp, 128);
diff -r e31b19dc7503 -r d6898a347719 sys/arch/x68k/x68k/trap.c
--- a/sys/arch/x68k/x68k/trap.c Sat Sep 25 18:49:03 2021 +0000
+++ b/sys/arch/x68k/x68k/trap.c Sat Sep 25 19:16:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.109 2019/11/21 19:24:02 ad Exp $    */
+/*     $NetBSD: trap.c,v 1.110 2021/09/25 19:16:31 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.109 2019/11/21 19:24:02 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.110 2021/09/25 19:16:31 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -306,7 +306,10 @@
                        printf("trap during panic!\n");
 #ifdef DEBUG
                        /* XXX should be a machine-dependent hook */
-                       printf("(press a key)\n"); (void)cngetc();
+                       printf("(press a key)\n");
+                       cnpollc(1);
+                       (void)cngetc();
+                       cnpollc(0);
 #endif
                }
                regdump((struct trapframe *)fp, 128);



Home | Main Index | Thread Index | Old Index