diff options
author | des <des@FreeBSD.org> | 2003-03-02 16:54:40 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-03-02 16:54:40 +0000 |
commit | 2756b6c9641bd9899a346582c191310de25cccc5 (patch) | |
tree | 351747321ab136aa733f670c4c2c235b3639bc1e /sys/i4b | |
parent | 3780674329cabab230b12923047c8aa84e4f05fc (diff) | |
download | FreeBSD-src-2756b6c9641bd9899a346582c191310de25cccc5.zip FreeBSD-src-2756b6c9641bd9899a346582c191310de25cccc5.tar.gz |
More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).
Diffstat (limited to 'sys/i4b')
-rw-r--r-- | sys/i4b/driver/i4b_rbch.c | 16 | ||||
-rw-r--r-- | sys/i4b/driver/i4b_tel.c | 30 | ||||
-rw-r--r-- | sys/i4b/driver/i4b_trace.c | 4 | ||||
-rw-r--r-- | sys/i4b/layer4/i4b_i4bdrv.c | 6 |
4 files changed, 28 insertions, 28 deletions
diff --git a/sys/i4b/driver/i4b_rbch.c b/sys/i4b/driver/i4b_rbch.c index 10b9add..63b941d 100644 --- a/sys/i4b/driver/i4b_rbch.c +++ b/sys/i4b/driver/i4b_rbch.c @@ -260,7 +260,7 @@ i4brbchread(dev_t dev, struct uio *uio, int ioflag) { NDBGL4(L4_RBCHDBG, "unit %d, wait read init", unit); - if((error = tsleep((caddr_t) &rbch_softc[unit], + if((error = tsleep( &rbch_softc[unit], TTIPRI | PCATCH, "rrrbch", 0 )) != 0) { @@ -281,7 +281,7 @@ i4brbchread(dev_t dev, struct uio *uio, int ioflag) NDBGL4(L4_RBCHDBG, "unit %d, wait read data", unit); - if((error = tsleep((caddr_t) &isdn_linktab[unit]->rx_queue, + if((error = tsleep( &isdn_linktab[unit]->rx_queue, TTIPRI | PCATCH, "rrbch", 0 )) != 0) { @@ -355,7 +355,7 @@ i4brbchwrite(dev_t dev, struct uio * uio, int ioflag) { NDBGL4(L4_RBCHDBG, "unit %d, write wait init", unit); - error = tsleep((caddr_t) &rbch_softc[unit], + error = tsleep( &rbch_softc[unit], TTIPRI | PCATCH, "wrrbch", 0 ); if(error == ERESTART) { @@ -374,7 +374,7 @@ i4brbchwrite(dev_t dev, struct uio * uio, int ioflag) NDBGL4(L4_RBCHDBG, "unit %d, error %d tsleep init", unit, error); return(error); } - tsleep((caddr_t) &rbch_softc[unit], TTIPRI | PCATCH, "xrbch", (hz*1)); + tsleep( &rbch_softc[unit], TTIPRI | PCATCH, "xrbch", (hz*1)); } while(_IF_QFULL(isdn_linktab[unit]->tx_queue) && (sc->sc_devstate & ST_ISOPEN)) @@ -383,7 +383,7 @@ i4brbchwrite(dev_t dev, struct uio * uio, int ioflag) NDBGL4(L4_RBCHDBG, "unit %d, write queue full", unit); - if ((error = tsleep((caddr_t) &isdn_linktab[unit]->tx_queue, + if ((error = tsleep( &isdn_linktab[unit]->tx_queue, TTIPRI | PCATCH, "wrbch", 0)) != 0) { sc->sc_devstate &= ~ST_WRWAITEMPTY; @@ -655,7 +655,7 @@ rbch_connect(int unit, void *cdp) NDBGL4(L4_RBCHDBG, "unit %d, wakeup", unit); sc->sc_devstate |= ST_CONNECTED; sc->sc_cd = cdp; - wakeup((caddr_t)sc); + wakeup(sc); } } @@ -737,7 +737,7 @@ rbch_rx_data_rdy(int unit) { NDBGL4(L4_RBCHDBG, "unit %d, wakeup", unit); rbch_softc[unit].sc_devstate &= ~ST_RDWAITDATA; - wakeup((caddr_t) &isdn_linktab[unit]->rx_queue); + wakeup( &isdn_linktab[unit]->rx_queue); } else { @@ -758,7 +758,7 @@ rbch_tx_queue_empty(int unit) { NDBGL4(L4_RBCHDBG, "unit %d, wakeup", unit); rbch_softc[unit].sc_devstate &= ~ST_WRWAITEMPTY; - wakeup((caddr_t) &isdn_linktab[unit]->tx_queue); + wakeup( &isdn_linktab[unit]->tx_queue); } else { diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c index b4e54d8..3792e86 100644 --- a/sys/i4b/driver/i4b_tel.c +++ b/sys/i4b/driver/i4b_tel.c @@ -254,7 +254,7 @@ i4btelclose(dev_t dev, int flag, int fmt, struct thread *td) { sc->devstate |= ST_WRWAITEMPTY; - if((error = tsleep((caddr_t) &sc->isdn_linktab->tx_queue, + if((error = tsleep( &sc->isdn_linktab->tx_queue, TTIPRI | PCATCH, "wtcl", 0)) != 0) { break; @@ -265,7 +265,7 @@ i4btelclose(dev_t dev, int flag, int fmt, struct thread *td) sc->devstate &= ~ST_ISOPEN; splx(x); - wakeup((caddr_t) &sc->tones); + wakeup( &sc->tones); return(error); } @@ -351,7 +351,7 @@ i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) s = splimp(); while ((sc->devstate & ST_TONE) && sc->tones.duration[sc->toneidx] != 0) { - if((error = tsleep((caddr_t) &sc->tones, + if((error = tsleep( &sc->tones, TTIPRI | PCATCH, "rtone", 0 )) != 0) { splx(s); return(error); @@ -423,7 +423,7 @@ i4btelread(dev_t dev, struct uio *uio, int ioflag) NDBGL4(L4_TELDBG, "i4btel%d, queue empty!", unit); - if((error = msleep((caddr_t) &sc->isdn_linktab->rx_queue, + if((error = msleep( &sc->isdn_linktab->rx_queue, &sc->isdn_linktab->rx_queue->ifq_mtx, TTIPRI | PCATCH, "rtel", 0 )) != 0) @@ -490,7 +490,7 @@ i4btelread(dev_t dev, struct uio *uio, int ioflag) NDBGL4(L4_TELDBG, "i4btel%d, wait for result!", unit); - if((error = tsleep((caddr_t) &sc->result, + if((error = tsleep( &sc->result, TTIPRI | PCATCH, "rtel1", 0 )) != 0) { @@ -559,7 +559,7 @@ i4btelwrite(dev_t dev, struct uio * uio, int ioflag) { sc->devstate |= ST_WRWAITEMPTY; - if((error = msleep((caddr_t) &sc->isdn_linktab->tx_queue, + if((error = msleep( &sc->isdn_linktab->tx_queue, &sc->isdn_linktab->tx_queue->ifq_mtx, TTIPRI | PCATCH, "wtel", 0)) != 0) { @@ -670,7 +670,7 @@ tel_tone(tel_sc_t *sc) sc->tonefreq = sc->tones.frequency[sc->toneidx]; } if (sc->tones.duration[sc->toneidx] == 0) { - wakeup((caddr_t) &sc->tones); + wakeup( &sc->tones); } } } @@ -795,7 +795,7 @@ tel_connect(int unit, void *cdp) if(sc->devstate & ST_RDWAITDATA) { sc->devstate &= ~ST_RDWAITDATA; - wakeup((caddr_t) &sc->result); + wakeup( &sc->result); } selwakeup(&sc->selp); } @@ -818,13 +818,13 @@ tel_disconnect(int unit, void *cdp) if(sc->devstate & ST_RDWAITDATA) { sc->devstate &= ~ST_RDWAITDATA; - wakeup((caddr_t) &sc->isdn_linktab->rx_queue); + wakeup( &sc->isdn_linktab->rx_queue); } if(sc->devstate & ST_WRWAITEMPTY) { sc->devstate &= ~ST_WRWAITEMPTY; - wakeup((caddr_t) &sc->isdn_linktab->tx_queue); + wakeup( &sc->isdn_linktab->tx_queue); } /* dialer device */ @@ -839,13 +839,13 @@ tel_disconnect(int unit, void *cdp) if(sc->devstate & ST_RDWAITDATA) { sc->devstate &= ~ST_RDWAITDATA; - wakeup((caddr_t) &sc->result); + wakeup( &sc->result); } selwakeup(&sc->selp); if (sc->devstate & ST_TONE) { sc->devstate &= ~ST_TONE; - wakeup((caddr_t) &sc->tones); + wakeup( &sc->tones); } } } @@ -868,7 +868,7 @@ tel_dialresponse(int unit, int status, cause_t cause) if(sc->devstate & ST_RDWAITDATA) { sc->devstate &= ~ST_RDWAITDATA; - wakeup((caddr_t) &sc->result); + wakeup( &sc->result); } selwakeup(&sc->selp); } @@ -895,7 +895,7 @@ tel_rx_data_rdy(int unit) if(sc->devstate & ST_RDWAITDATA) { sc->devstate &= ~ST_RDWAITDATA; - wakeup((caddr_t) &sc->isdn_linktab->rx_queue); + wakeup( &sc->isdn_linktab->rx_queue); } selwakeup(&sc->selp); } @@ -913,7 +913,7 @@ tel_tx_queue_empty(int unit) if(sc->devstate & ST_WRWAITEMPTY) { sc->devstate &= ~ST_WRWAITEMPTY; - wakeup((caddr_t) &sc->isdn_linktab->tx_queue); + wakeup( &sc->isdn_linktab->tx_queue); } if(sc->devstate & ST_TONE) { tel_tone(sc); diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c index fe374d8..a8201a4 100644 --- a/sys/i4b/driver/i4b_trace.c +++ b/sys/i4b/driver/i4b_trace.c @@ -217,7 +217,7 @@ get_trace_data_from_l1(i4b_trace_hdr_t *hdr, int len, char *buf) if(device_state[unit] & ST_WAITDATA) { device_state[unit] &= ~ST_WAITDATA; - wakeup((caddr_t) &trace_queue[unit]); + wakeup( &trace_queue[unit]); } splx(x); @@ -320,7 +320,7 @@ i4btrcread(dev_t dev, struct uio * uio, int ioflag) { device_state[unit] |= ST_WAITDATA; - if((error = msleep((caddr_t) &trace_queue[unit], + if((error = msleep( &trace_queue[unit], &trace_queue[unit].ifq_mtx, TTIPRI | PCATCH, "bitrc", 0 )) != 0) diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c index 2f31608..6d4a107 100644 --- a/sys/i4b/layer4/i4b_i4bdrv.c +++ b/sys/i4b/layer4/i4b_i4bdrv.c @@ -168,7 +168,7 @@ i4bread(dev_t dev, struct uio *uio, int ioflag) { readflag = 1; - error = msleep((caddr_t) &i4b_rdqueue, &i4b_rdqueue.ifq_mtx, + error = msleep( &i4b_rdqueue, &i4b_rdqueue.ifq_mtx, (PZERO + 1) | PCATCH, "bird", 0); if (error != 0) { @@ -820,7 +820,7 @@ i4bputqueue(struct mbuf *m) if(readflag) { readflag = 0; - wakeup((caddr_t) &i4b_rdqueue); + wakeup( &i4b_rdqueue); } if(selflag) @@ -863,7 +863,7 @@ i4bputqueue_hipri(struct mbuf *m) if(readflag) { readflag = 0; - wakeup((caddr_t) &i4b_rdqueue); + wakeup( &i4b_rdqueue); } if(selflag) |