Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/atari/dev Replace old MD sicallback functions with ...



details:   https://anonhg.NetBSD.org/src/rev/9bcde26af450
branches:  trunk
changeset: 753844:9bcde26af450
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Mon Apr 12 13:05:25 2010 +0000

description:
Replace old MD sicallback functions with MI softint(9).

diffstat:

 sys/arch/atari/dev/lpt.c |  23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diffs (76 lines):

diff -r 2d744d49d258 -r 9bcde26af450 sys/arch/atari/dev/lpt.c
--- a/sys/arch/atari/dev/lpt.c  Mon Apr 12 12:43:39 2010 +0000
+++ b/sys/arch/atari/dev/lpt.c  Mon Apr 12 13:05:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lpt.c,v 1.32 2009/11/23 00:11:43 rmind Exp $ */
+/*     $NetBSD: lpt.c,v 1.33 2010/04/12 13:05:25 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1996 Leo Weppelman
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.32 2009/11/23 00:11:43 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.33 2010/04/12 13:05:25 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -104,6 +104,7 @@
        u_char          sc_flags;
 #define        LPT_AUTOLF      0x20    /* automatic LF on CR XXX: LWP - not yet... */
 #define        LPT_NOINTR      0x40    /* do not use interrupt */
+       void            *sc_sicookie;
 };
 
 #define        LPTUNIT(s)      (minor(s) & 0x1f)
@@ -118,9 +119,9 @@
 
 static void lptwakeup (void *arg);
 static int pushbytes (struct lpt_softc *);
-static void lptpseudointr (struct lpt_softc *);
+static void lptpseudointr (void *);
 int lptintr (struct lpt_softc *);
-int lpthwintr (struct lpt_softc *, int);
+int lpthwintr (void *);
 
 
 /*
@@ -166,6 +167,7 @@
        if (intr_establish(0, USER_VEC, 0, (hw_ifun_t)lpthwintr, sc) == NULL)
                aprint_error_dev(dp, "Can't establish interrupt\n");
        ym2149_strobe(1);
+       sc->sc_sicookie = softint_establish(SOFTINT_SERIAL, lptpseudointr, sc);
 
        callout_init(&sc->sc_wakeup_ch, 0);
 }
@@ -382,21 +384,24 @@
 }
 
 static void
-lptpseudointr(struct lpt_softc *sc)
+lptpseudointr(void *arg)
 {
+       struct lpt_softc *sc;
        int     s;
 
+       sc = arg;
        s = spltty();
        lptintr(sc);
        splx(s);
 }
 
 int
-lpthwintr(struct lpt_softc *sc, int sr)
+lpthwintr(void *arg)
 {
-       if (!BASEPRI(sr))
-               add_sicallback((si_farg)lptpseudointr, sc, 0);
-       else lptpseudointr(sc);
+       struct lpt_softc *sc;
+
+       sc = arg;
+       softint_schedule(sc->sc_sicookie);
        return 1;
 }
 



Home | Main Index | Thread Index | Old Index