Module Name: src
Committed By: jmcneill
Date: Mon Dec 12 16:06:15 UTC 2011
Modified Files:
src/sys/arch/usermode/dev: ttycons.c
Log Message:
use spl_intr from signal handler instead of calling softint_schedule directly
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/usermode/dev/ttycons.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/usermode/dev/ttycons.c
diff -u src/sys/arch/usermode/dev/ttycons.c:1.8 src/sys/arch/usermode/dev/ttycons.c:1.9
--- src/sys/arch/usermode/dev/ttycons.c:1.8 Sun Dec 11 22:34:42 2011
+++ src/sys/arch/usermode/dev/ttycons.c Mon Dec 12 16:06:15 2011
@@ -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 <[email protected]>
@@ -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 @@ ttycons_intr(int sig)
{
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