diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-03-02 16:54:40 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-03-02 16:54:40 +0000 |
commit | 521f364b804158f257fdd8ad7cbf368a0efe5a44 (patch) | |
tree | 351747321ab136aa733f670c4c2c235b3639bc1e /sys/pc98 | |
parent | 715b1e0ab00116f80903f29c1c794097b1dd7374 (diff) | |
download | src-521f364b804158f257fdd8ad7cbf368a0efe5a44.tar.gz src-521f364b804158f257fdd8ad7cbf368a0efe5a44.zip |
More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).
Notes
Notes:
svn path=/head/; revision=111748
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/olpt.c | 10 | ||||
-rw-r--r-- | sys/pc98/cbus/ppc.c | 6 | ||||
-rw-r--r-- | sys/pc98/pc98/atapi.c | 8 | ||||
-rw-r--r-- | sys/pc98/pc98/mse.c | 4 | ||||
-rw-r--r-- | sys/pc98/pc98/olpt.c | 10 | ||||
-rw-r--r-- | sys/pc98/pc98/ppc.c | 6 | ||||
-rw-r--r-- | sys/pc98/pc98/spkr.c | 8 | ||||
-rw-r--r-- | sys/pc98/pc98/syscons.c | 12 |
8 files changed, 32 insertions, 32 deletions
diff --git a/sys/pc98/cbus/olpt.c b/sys/pc98/cbus/olpt.c index 5369e46a798b..6e41a420ec53 100644 --- a/sys/pc98/cbus/olpt.c +++ b/sys/pc98/cbus/olpt.c @@ -535,7 +535,7 @@ lptopen (dev_t dev, int flags, int fmt, struct thread *td) } /* wait 1/4 second, give up if we get a signal */ - if (tsleep ((caddr_t)sc, LPPRI|PCATCH, "lptinit", hz/4) != + if (tsleep (sc, LPPRI|PCATCH, "lptinit", hz/4) != EWOULDBLOCK) { sc->sc_state = 0; splx(s); @@ -601,7 +601,7 @@ lptout (void *arg) splx(pl); } else { sc->sc_state &= ~OBUSY; - wakeup((caddr_t)sc); + wakeup(sc); } } @@ -634,7 +634,7 @@ lptclose(dev_t dev, int flags, int fmt, struct thread *td) while ((inb(port+lpt_status) & (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR)) != (LPS_SEL|LPS_NBSY|LPS_NERR) || sc->sc_xfercnt) /* wait 1/4 second, give up if we get a signal */ - if (tsleep ((caddr_t)sc, LPPRI|PCATCH, + if (tsleep (sc, LPPRI|PCATCH, "lpclose", hz) != EWOULDBLOCK) break; @@ -692,7 +692,7 @@ pushbytes(struct lpt_softc * sc) */ if (tic > MAX_SLEEP) tic = MAX_SLEEP; - err = tsleep((caddr_t)sc, LPPRI, + err = tsleep(sc, LPPRI, "lptpoll", tic); if (err != EWOULDBLOCK) { return (err); @@ -754,7 +754,7 @@ lptwrite(dev_t dev, struct uio * uio, int ioflag) } lprintf(("W ")); if (sc->sc_state & OBUSY) - if ((err = tsleep ((caddr_t)sc, + if ((err = tsleep (sc, LPPRI|PCATCH, "lpwrite", 0))) { sc->sc_state |= INTERRUPTED; return(err); diff --git a/sys/pc98/cbus/ppc.c b/sys/pc98/cbus/ppc.c index b285fce0e391..d86793442d9d 100644 --- a/sys/pc98/cbus/ppc.c +++ b/sys/pc98/cbus/ppc.c @@ -1619,7 +1619,7 @@ ppcintr(void *arg) ppc->ppc_dmastat = PPC_DMA_COMPLETE; /* wakeup the waiting process */ - wakeup((caddr_t)ppc); + wakeup(ppc); } } } else if (ppc->ppc_irqstat & PPC_IRQ_FIFO) { @@ -1725,7 +1725,7 @@ ppc_write(device_t dev, char *buf, int len, int how) */ do { /* release CPU */ - error = tsleep((caddr_t)ppc, + error = tsleep(ppc, PPBPRI | PCATCH, "ppcdma", 0); } while (error == EWOULDBLOCK); @@ -1757,7 +1757,7 @@ ppc_write(device_t dev, char *buf, int len, int how) #ifdef PPC_DEBUG printf("Z"); #endif - error = tsleep((caddr_t)ppc, PPBPRI | PCATCH, "ppcfifo", hz/100); + error = tsleep(ppc, PPBPRI | PCATCH, "ppcfifo", hz/100); if (error != EWOULDBLOCK) { #ifdef PPC_DEBUG printf("I"); diff --git a/sys/pc98/pc98/atapi.c b/sys/pc98/pc98/atapi.c index 5c27dc277b01..d52fff5a6fea 100644 --- a/sys/pc98/pc98/atapi.c +++ b/sys/pc98/pc98/atapi.c @@ -509,7 +509,7 @@ static struct atapicmd *atapi_alloc (struct atapi *ata) struct atapicmd *ac; while (! ata->free) - tsleep ((caddr_t)ata, PRIBIO, "atacmd", 100); + tsleep (ata, PRIBIO, "atacmd", 100); ac = ata->free; ata->free = ac->next; ac->busy = 1; @@ -519,7 +519,7 @@ static struct atapicmd *atapi_alloc (struct atapi *ata) static void atapi_free (struct atapi *ata, struct atapicmd *ac) { if (! ata->free) - wakeup ((caddr_t)ata); + wakeup (ata); ac->busy = 0; ac->next = ata->free; ata->free = ac; @@ -553,7 +553,7 @@ static void atapi_done (struct atapi *ata) (*ac->callback) (ac->cbarg1, ac->cbarg2, ac->count, ac->result); atapi_free (ata, ac); } else - wakeup ((caddr_t)ac); + wakeup (ac); } /* @@ -899,7 +899,7 @@ struct atapires atapi_request_wait (struct atapi *ata, int unit, atapi_enqueue (ata, ac); wdstart (ata->ctrlr); if (ata->tail == ac) - tsleep ((caddr_t)ac, PRIBIO, "atareq", 0); + tsleep (ac, PRIBIO, "atareq", 0); result = ac->result; atapi_free (ata, ac); diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c index 52bd373f712b..25035f5827f2 100644 --- a/sys/pc98/pc98/mse.c +++ b/sys/pc98/pc98/mse.c @@ -535,7 +535,7 @@ mseread(dev, uio, ioflag) return (0); } sc->sc_flags |= MSESC_WANT; - error = tsleep((caddr_t)sc, MSEPRI | PCATCH, + error = tsleep(sc, MSEPRI | PCATCH, "mseread", 0); if (error) { splx(s); @@ -814,7 +814,7 @@ mseintr(arg) (sc->sc_obuttons ^ sc->sc_buttons) != 0) { if (sc->sc_flags & MSESC_WANT) { sc->sc_flags &= ~MSESC_WANT; - wakeup((caddr_t)sc); + wakeup(sc); } selwakeup(&sc->sc_selp); } diff --git a/sys/pc98/pc98/olpt.c b/sys/pc98/pc98/olpt.c index 5369e46a798b..6e41a420ec53 100644 --- a/sys/pc98/pc98/olpt.c +++ b/sys/pc98/pc98/olpt.c @@ -535,7 +535,7 @@ lptopen (dev_t dev, int flags, int fmt, struct thread *td) } /* wait 1/4 second, give up if we get a signal */ - if (tsleep ((caddr_t)sc, LPPRI|PCATCH, "lptinit", hz/4) != + if (tsleep (sc, LPPRI|PCATCH, "lptinit", hz/4) != EWOULDBLOCK) { sc->sc_state = 0; splx(s); @@ -601,7 +601,7 @@ lptout (void *arg) splx(pl); } else { sc->sc_state &= ~OBUSY; - wakeup((caddr_t)sc); + wakeup(sc); } } @@ -634,7 +634,7 @@ lptclose(dev_t dev, int flags, int fmt, struct thread *td) while ((inb(port+lpt_status) & (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR)) != (LPS_SEL|LPS_NBSY|LPS_NERR) || sc->sc_xfercnt) /* wait 1/4 second, give up if we get a signal */ - if (tsleep ((caddr_t)sc, LPPRI|PCATCH, + if (tsleep (sc, LPPRI|PCATCH, "lpclose", hz) != EWOULDBLOCK) break; @@ -692,7 +692,7 @@ pushbytes(struct lpt_softc * sc) */ if (tic > MAX_SLEEP) tic = MAX_SLEEP; - err = tsleep((caddr_t)sc, LPPRI, + err = tsleep(sc, LPPRI, "lptpoll", tic); if (err != EWOULDBLOCK) { return (err); @@ -754,7 +754,7 @@ lptwrite(dev_t dev, struct uio * uio, int ioflag) } lprintf(("W ")); if (sc->sc_state & OBUSY) - if ((err = tsleep ((caddr_t)sc, + if ((err = tsleep (sc, LPPRI|PCATCH, "lpwrite", 0))) { sc->sc_state |= INTERRUPTED; return(err); diff --git a/sys/pc98/pc98/ppc.c b/sys/pc98/pc98/ppc.c index b285fce0e391..d86793442d9d 100644 --- a/sys/pc98/pc98/ppc.c +++ b/sys/pc98/pc98/ppc.c @@ -1619,7 +1619,7 @@ ppcintr(void *arg) ppc->ppc_dmastat = PPC_DMA_COMPLETE; /* wakeup the waiting process */ - wakeup((caddr_t)ppc); + wakeup(ppc); } } } else if (ppc->ppc_irqstat & PPC_IRQ_FIFO) { @@ -1725,7 +1725,7 @@ ppc_write(device_t dev, char *buf, int len, int how) */ do { /* release CPU */ - error = tsleep((caddr_t)ppc, + error = tsleep(ppc, PPBPRI | PCATCH, "ppcdma", 0); } while (error == EWOULDBLOCK); @@ -1757,7 +1757,7 @@ ppc_write(device_t dev, char *buf, int len, int how) #ifdef PPC_DEBUG printf("Z"); #endif - error = tsleep((caddr_t)ppc, PPBPRI | PCATCH, "ppcfifo", hz/100); + error = tsleep(ppc, PPBPRI | PCATCH, "ppcfifo", hz/100); if (error != EWOULDBLOCK) { #ifdef PPC_DEBUG printf("I"); diff --git a/sys/pc98/pc98/spkr.c b/sys/pc98/pc98/spkr.c index 3e3f43767dd3..a1fe003e388e 100644 --- a/sys/pc98/pc98/spkr.c +++ b/sys/pc98/pc98/spkr.c @@ -141,7 +141,7 @@ tone(thz, ticks) * emitted. */ if (ticks > 0) - tsleep((caddr_t)&endtone, SPKRPRI | PCATCH, "spkrtn", ticks); + tsleep(&endtone, SPKRPRI | PCATCH, "spkrtn", ticks); #ifdef PC98 outb(IO_PPI, inb(IO_PPI) | PPI_SPKR); sps = splclock(); @@ -169,7 +169,7 @@ rest(ticks) (void) printf("rest: %d\n", ticks); #endif /* DEBUG */ if (ticks > 0) - tsleep((caddr_t)&endrest, SPKRPRI | PCATCH, "spkrrs", ticks); + tsleep(&endrest, SPKRPRI | PCATCH, "spkrrs", ticks); } /**************** PLAY STRING INTERPRETER BEGINS HERE ********************** @@ -556,8 +556,8 @@ spkrclose(dev, flags, fmt, td) return(ENXIO); else { - wakeup((caddr_t)&endtone); - wakeup((caddr_t)&endrest); + wakeup(&endtone); + wakeup(&endrest); free(spkr_inbuf, M_SPKR); spkr_active = FALSE; return(0); diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index 0adbd5049cda..3d015f14c47a 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/syscons.c @@ -1014,7 +1014,7 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) scp = SC_STAT(SC_DEV(sc, i)); if (scp == scp->sc->cur_scp) return 0; - while ((error=tsleep((caddr_t)&scp->smode, PZERO|PCATCH, + while ((error=tsleep(&scp->smode, PZERO|PCATCH, "waitvt", 0)) == ERESTART) ; return error; @@ -2100,7 +2100,7 @@ stop_scrn_saver(sc_softc_t *sc, void (*saver)(sc_softc_t *, int)) if (sc->delayed_next_scr) sc_switch_scr(sc, sc->delayed_next_scr - 1); if (debugger == 0) - wakeup((caddr_t)&scrn_blanked); + wakeup(&scrn_blanked); } static int @@ -2114,7 +2114,7 @@ wait_scrn_saver_stop(sc_softc_t *sc) error = 0; break; } - error = tsleep((caddr_t)&scrn_blanked, PZERO | PCATCH, "scrsav", 0); + error = tsleep(&scrn_blanked, PZERO | PCATCH, "scrsav", 0); if ((error != 0) && (error != ERESTART)) break; } @@ -2313,7 +2313,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) * be invoked at splhigh(). */ if (debugger == 0) - wakeup((caddr_t)&sc->new_scp->smode); + wakeup(&sc->new_scp->smode); splx(s); DPRINTF(5, ("switch done (new == old)\n")); return 0; @@ -2336,7 +2336,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) /* wake up processes waiting for this vty */ if (debugger == 0) - wakeup((caddr_t)&sc->cur_scp->smode); + wakeup(&sc->cur_scp->smode); /* wait for the controlling process to acknowledge, if necessary */ if (signal_vt_acq(sc->cur_scp)) { @@ -2362,7 +2362,7 @@ do_switch_scr(sc_softc_t *sc, int s) exchange_scr(sc); s = spltty(); /* sc->cur_scp == sc->new_scp */ - wakeup((caddr_t)&sc->cur_scp->smode); + wakeup(&sc->cur_scp->smode); /* wait for the controlling process to acknowledge, if necessary */ if (!signal_vt_acq(sc->cur_scp)) { |