Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode/dev use spl_intr from signal handler inste...



details:   https://anonhg.NetBSD.org/src/rev/03b11d3b7e61
branches:  trunk
changeset: 771985:03b11d3b7e61
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Dec 12 16:06:15 2011 +0000

description:
use spl_intr from signal handler instead of calling softint_schedule directly

diffstat:

 sys/arch/usermode/dev/ttycons.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r 0a95d413d617 -r 03b11d3b7e61 sys/arch/usermode/dev/ttycons.c
--- a/sys/arch/usermode/dev/ttycons.c   Mon Dec 12 15:21:32 2011 +0000
+++ b/sys/arch/usermode/dev/ttycons.c   Mon Dec 12 16:06:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ttycons.c,v 1.8 2011/12/11 22:34:42 jmcneill Exp $ */
+/* $NetBSD: ttycons.c,v 1.9 2011/12/12 16:06:15 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttycons.c,v 1.8 2011/12/11 22:34:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttycons.c,v 1.9 2011/12/12 16:06:15 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -333,11 +333,13 @@
 {
        struct ttycons_softc *sc;
 
+       curcpu()->ci_idepth++;
        sc = device_lookup_private(&ttycons_cd, minor(cn_tab->cn_dev));
-       if (sc == NULL)
-               return;
+       if (sc) {
+               spl_intr(IPL_SERIAL, softint_schedule, sc->sc_rd_sih);
+       }
+       curcpu()->ci_idepth--;
 
-       softint_schedule(sc->sc_rd_sih);
 }
 
 static void



Home | Main Index | Thread Index | Old Index