More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).
This commit is contained in:
parent
715b1e0ab0
commit
521f364b80
@ -1419,7 +1419,7 @@ svr4_sys_waitsys(td, uap)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((error = tsleep((caddr_t)td->td_proc, PWAIT | PCATCH, "svr4_wait", 0)) != 0)
|
||||
if ((error = tsleep(td->td_proc, PWAIT | PCATCH, "svr4_wait", 0)) != 0)
|
||||
return error;
|
||||
goto loop;
|
||||
}
|
||||
|
@ -1101,7 +1101,7 @@ ASR_failActiveCommands (
|
||||
if (ccb->path) {
|
||||
xpt_done ((union ccb *)ccb);
|
||||
} else {
|
||||
wakeup ((caddr_t)ccb);
|
||||
wakeup (ccb);
|
||||
}
|
||||
}
|
||||
splx(s);
|
||||
@ -3798,7 +3798,7 @@ asr_intr (
|
||||
if (ccb->ccb_h.path) {
|
||||
xpt_done ((union ccb *)ccb);
|
||||
} else {
|
||||
wakeup ((caddr_t)ccb);
|
||||
wakeup (ccb);
|
||||
}
|
||||
}
|
||||
#ifdef ASR_MEASURE_PERFORMANCE
|
||||
@ -4313,7 +4313,7 @@ ASR_queue_i(
|
||||
}
|
||||
/* Check every second for BlinkLed */
|
||||
/* There is no PRICAM, but outwardly PRIBIO is functional */
|
||||
tsleep((caddr_t)ccb, PRIBIO, "asr", hz);
|
||||
tsleep(ccb, PRIBIO, "asr", hz);
|
||||
}
|
||||
splx(s);
|
||||
|
||||
|
@ -629,7 +629,7 @@ ata_intr(void *data)
|
||||
#endif
|
||||
default:
|
||||
if (ch->active & ATA_WAIT_INTR)
|
||||
wakeup((caddr_t)ch);
|
||||
wakeup(ch);
|
||||
}
|
||||
|
||||
if (ch->active & ATA_CONTROL) {
|
||||
@ -1113,7 +1113,7 @@ ata_command(struct ata_device *atadev, u_int8_t command,
|
||||
if (atadev->channel->flags & ATA_QUEUED)
|
||||
ATA_OUTB(atadev->channel->r_altio, ATA_ALTSTAT, ATA_A_4BIT);
|
||||
|
||||
if (tsleep((caddr_t)atadev->channel, PRIBIO, "atacmd", 10 * hz)) {
|
||||
if (tsleep(atadev->channel, PRIBIO, "atacmd", 10 * hz)) {
|
||||
ata_prtdev(atadev, "timeout waiting for interrupt\n");
|
||||
atadev->channel->active &= ~ATA_WAIT_INTR;
|
||||
error = -1;
|
||||
|
@ -1865,14 +1865,14 @@ ata_pci_serialize(struct ata_channel *ch, int flags)
|
||||
if (scp->locked_ch == ch->unit)
|
||||
break;
|
||||
while (!atomic_cmpset_acq_int(&scp->locked_ch, -1, ch->unit))
|
||||
tsleep((caddr_t)ch->locking, PRIBIO, "atalck", 1);
|
||||
tsleep(ch->locking, PRIBIO, "atalck", 1);
|
||||
break;
|
||||
|
||||
case ATA_LF_UNLOCK:
|
||||
if (scp->locked_ch == -1 || scp->locked_ch != ch->unit)
|
||||
break;
|
||||
atomic_store_rel_int(&scp->locked_ch, -1);
|
||||
wakeup((caddr_t)ch->locking);
|
||||
wakeup(ch->locking);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
@ -202,7 +202,7 @@ atapi_queue_cmd(struct ata_device *atadev, int8_t *ccb, caddr_t data,
|
||||
|
||||
/* only sleep when command is in progress */
|
||||
if (request->error == EINPROGRESS)
|
||||
tsleep((caddr_t)request, PRIBIO, "atprq", 0);
|
||||
tsleep(request, PRIBIO, "atprq", 0);
|
||||
splx(s);
|
||||
error = request->error;
|
||||
if (error)
|
||||
@ -489,7 +489,7 @@ atapi_wait_dsc(struct ata_device *atadev, int timeout)
|
||||
error = atapi_queue_cmd(atadev, ccb, NULL, 0, 0, 0, NULL, NULL);
|
||||
if (error != EBUSY)
|
||||
break;
|
||||
tsleep((caddr_t)&error, PRIBIO, "atpwt", hz / 2);
|
||||
tsleep(&error, PRIBIO, "atpwt", hz / 2);
|
||||
timeout -= (hz / 2);
|
||||
}
|
||||
return error;
|
||||
@ -577,7 +577,7 @@ atapi_finish(struct atapi_request *request)
|
||||
free(request, M_ATAPI);
|
||||
}
|
||||
else
|
||||
wakeup((caddr_t)request);
|
||||
wakeup(request);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -608,7 +608,7 @@ atapi_timeout(struct atapi_request *request)
|
||||
else {
|
||||
/* retries all used up, return error */
|
||||
request->error = EIO;
|
||||
wakeup((caddr_t)request);
|
||||
wakeup(request);
|
||||
}
|
||||
ata_reinit(atadev->channel);
|
||||
}
|
||||
|
@ -1528,7 +1528,7 @@ psmread(dev_t dev, struct uio *uio, int flag)
|
||||
return EWOULDBLOCK;
|
||||
}
|
||||
sc->state |= PSM_ASLP;
|
||||
error = tsleep((caddr_t) sc, PZERO | PCATCH, "psmrea", 0);
|
||||
error = tsleep( sc, PZERO | PCATCH, "psmrea", 0);
|
||||
sc->state &= ~PSM_ASLP;
|
||||
if (error) {
|
||||
splx(s);
|
||||
@ -2366,7 +2366,7 @@ psmintr(void *arg)
|
||||
|
||||
if (sc->state & PSM_ASLP) {
|
||||
sc->state &= ~PSM_ASLP;
|
||||
wakeup((caddr_t) sc);
|
||||
wakeup( sc);
|
||||
}
|
||||
selwakeup(&sc->rsel);
|
||||
}
|
||||
@ -2821,7 +2821,7 @@ psmresume(device_t dev)
|
||||
* cannot be accessed anymore.
|
||||
*/
|
||||
sc->state &= ~PSM_ASLP;
|
||||
wakeup((caddr_t)sc);
|
||||
wakeup(sc);
|
||||
}
|
||||
|
||||
if (verbose >= 2)
|
||||
|
@ -1231,7 +1231,7 @@ static void
|
||||
dgb_pause(chan)
|
||||
void *chan;
|
||||
{
|
||||
wakeup((caddr_t)chan);
|
||||
wakeup(chan);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -253,7 +253,7 @@ fw_read (dev_t dev, struct uio *uio, int ioflag)
|
||||
return err;
|
||||
}
|
||||
ir->flag |= FWXFERQ_WAKEUP;
|
||||
err = tsleep((caddr_t)ir, FWPRI, "fw_read", hz);
|
||||
err = tsleep(ir, FWPRI, "fw_read", hz);
|
||||
ir->flag &= ~FWXFERQ_WAKEUP;
|
||||
if (err == 0)
|
||||
goto readloop;
|
||||
@ -375,7 +375,7 @@ fw_write (dev_t dev, struct uio *uio, int ioflag)
|
||||
err = sc->fc->itx_enable(sc->fc, sub);
|
||||
if (err)
|
||||
return err;
|
||||
err = tsleep((caddr_t)it, FWPRI,
|
||||
err = tsleep(it, FWPRI,
|
||||
"fw_write", hz);
|
||||
if (err)
|
||||
return err;
|
||||
@ -420,7 +420,7 @@ fw_write (dev_t dev, struct uio *uio, int ioflag)
|
||||
if(err){
|
||||
return err;
|
||||
}
|
||||
err = tsleep((caddr_t)it, FWPRI, "fw_write", hz);
|
||||
err = tsleep(it, FWPRI, "fw_write", hz);
|
||||
if(err){
|
||||
return err;
|
||||
}
|
||||
@ -503,7 +503,7 @@ fw_write (dev_t dev, struct uio *uio, int ioflag)
|
||||
#else
|
||||
fw_asyreq(fc, -1, xfer);
|
||||
#endif
|
||||
err = tsleep((caddr_t)xfer, FWPRI, "fw_write", hz);
|
||||
err = tsleep(xfer, FWPRI, "fw_write", hz);
|
||||
if(xfer->resp == EBUSY)
|
||||
return EBUSY;
|
||||
fw_xfer_free( xfer);
|
||||
@ -777,7 +777,7 @@ fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
|
||||
fw_xfer_free( xfer);
|
||||
return err;
|
||||
}
|
||||
err = tsleep((caddr_t)xfer, FWPRI, "asyreq", hz);
|
||||
err = tsleep(xfer, FWPRI, "asyreq", hz);
|
||||
if(err == 0){
|
||||
if(asyreq->req.len >= xfer->recv.len){
|
||||
asyreq->req.len = xfer->recv.len;
|
||||
|
@ -329,7 +329,7 @@ fore_cmd_drain(fup)
|
||||
/*
|
||||
* Poke whoever is waiting on the stats
|
||||
*/
|
||||
wakeup((caddr_t)&fup->fu_stats);
|
||||
wakeup(&fup->fu_stats);
|
||||
break;
|
||||
|
||||
case CMD_GET_PROM:
|
||||
@ -416,7 +416,7 @@ fore_cmd_free(fup)
|
||||
* Just in case someone is sleeping on this
|
||||
*/
|
||||
fup->fu_stats_ret = EIO;
|
||||
wakeup((caddr_t)&fup->fu_stats);
|
||||
wakeup(&fup->fu_stats);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -445,7 +445,7 @@ ida_wait(struct ida_softc *ida, struct ida_qcb *qcb)
|
||||
int delay;
|
||||
|
||||
if (ida->flags & IDA_INTERRUPTS) {
|
||||
if (tsleep((caddr_t)qcb, PRIBIO, "idacmd", 5 * hz))
|
||||
if (tsleep(qcb, PRIBIO, "idacmd", 5 * hz))
|
||||
return (ETIMEDOUT);
|
||||
return (0);
|
||||
}
|
||||
|
@ -578,7 +578,7 @@ genkbdread(dev_t dev, struct uio *uio, int flag)
|
||||
return EWOULDBLOCK;
|
||||
}
|
||||
sc->gkb_flags |= KB_ASLEEP;
|
||||
error = tsleep((caddr_t)sc, PZERO | PCATCH, "kbdrea", 0);
|
||||
error = tsleep(sc, PZERO | PCATCH, "kbdrea", 0);
|
||||
kbd = kbd_get_keyboard(KBD_INDEX(dev));
|
||||
if ((kbd == NULL) || !KBD_IS_VALID(kbd)) {
|
||||
splx(s);
|
||||
@ -677,7 +677,7 @@ genkbd_event(keyboard_t *kbd, int event, void *arg)
|
||||
kbd_release(kbd, (void *)sc);
|
||||
if (sc->gkb_flags & KB_ASLEEP) {
|
||||
sc->gkb_flags &= ~KB_ASLEEP;
|
||||
wakeup((caddr_t)sc);
|
||||
wakeup(sc);
|
||||
}
|
||||
selwakeup(&sc->gkb_rsel);
|
||||
return 0;
|
||||
@ -748,7 +748,7 @@ genkbd_event(keyboard_t *kbd, int event, void *arg)
|
||||
if (sc->gkb_q.c_cc > 0) {
|
||||
if (sc->gkb_flags & KB_ASLEEP) {
|
||||
sc->gkb_flags &= ~KB_ASLEEP;
|
||||
wakeup((caddr_t)sc);
|
||||
wakeup(sc);
|
||||
}
|
||||
selwakeup(&sc->gkb_rsel);
|
||||
}
|
||||
|
@ -474,7 +474,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);
|
||||
@ -753,7 +753,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);
|
||||
}
|
||||
|
@ -511,7 +511,7 @@ pcic_event_thread(void *arg)
|
||||
} else {
|
||||
splx(s);
|
||||
/* sleep .25s to be enqueued chatterling interrupts */
|
||||
(void) tsleep((caddr_t)pcic_event_thread, PWAIT, "pcicss", hz/4);
|
||||
(void) tsleep(pcic_event_thread, PWAIT, "pcicss", hz/4);
|
||||
}
|
||||
s = splhigh();
|
||||
STAILQ_REMOVE_HEAD_UNTIL(&h->events, pe, pe_q);
|
||||
|
@ -444,7 +444,7 @@ lptout(void *arg)
|
||||
lptintr(dev);
|
||||
} else {
|
||||
sc->sc_state &= ~OBUSY;
|
||||
wakeup((caddr_t)dev);
|
||||
wakeup(dev);
|
||||
}
|
||||
}
|
||||
|
||||
@ -523,7 +523,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)lptdev, LPPRI|PCATCH, "lptinit", hz/4) !=
|
||||
if (tsleep(lptdev, LPPRI|PCATCH, "lptinit", hz/4) !=
|
||||
EWOULDBLOCK) {
|
||||
sc->sc_state = 0;
|
||||
splx(s);
|
||||
@ -597,7 +597,7 @@ lptclose(dev_t dev, int flags, int fmt, struct thread *td)
|
||||
(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)lptdev, LPPRI|PCATCH,
|
||||
if (tsleep(lptdev, LPPRI|PCATCH,
|
||||
"lpclose", hz) != EWOULDBLOCK)
|
||||
break;
|
||||
|
||||
@ -661,7 +661,7 @@ lpt_pushbytes(device_t dev)
|
||||
*/
|
||||
if (tic > MAX_SLEEP)
|
||||
tic = MAX_SLEEP;
|
||||
err = tsleep((caddr_t)dev, LPPRI,
|
||||
err = tsleep(dev, LPPRI,
|
||||
LPT_NAME "poll", tic);
|
||||
if (err != EWOULDBLOCK) {
|
||||
return (err);
|
||||
@ -796,7 +796,7 @@ lptwrite(dev_t dev, struct uio *uio, int ioflag)
|
||||
}
|
||||
lprintf(("W "));
|
||||
if (sc->sc_state & OBUSY)
|
||||
if ((err = tsleep((caddr_t)lptdev,
|
||||
if ((err = tsleep(lptdev,
|
||||
LPPRI|PCATCH, LPT_NAME "write", 0))) {
|
||||
sc->sc_state |= INTERRUPTED;
|
||||
return(err);
|
||||
@ -872,7 +872,7 @@ lpt_intr(void *arg)
|
||||
sc->sc_state &= ~OBUSY;
|
||||
|
||||
if(!(sc->sc_state & INTERRUPTED))
|
||||
wakeup((caddr_t)lptdev);
|
||||
wakeup(lptdev);
|
||||
lprintf(("w "));
|
||||
return;
|
||||
} else { /* check for error */
|
||||
|
@ -1614,7 +1614,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) {
|
||||
@ -1720,7 +1720,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);
|
||||
@ -1752,7 +1752,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");
|
||||
|
@ -1007,7 +1007,7 @@ rc_hardclose(struct rc_chans *rc)
|
||||
}
|
||||
}
|
||||
rc->rc_flags &= ~RC_ACTOUT;
|
||||
wakeup((caddr_t) &rc->rc_rcb); /* wake bi */
|
||||
wakeup( &rc->rc_rcb); /* wake bi */
|
||||
wakeup(TSA_CARR_ON(tp));
|
||||
(void) splx(s);
|
||||
}
|
||||
|
@ -850,7 +850,7 @@ sihardclose(struct si_port *pp)
|
||||
|
||||
}
|
||||
pp->sp_active_out = FALSE;
|
||||
wakeup((caddr_t)&pp->sp_active_out);
|
||||
wakeup(&pp->sp_active_out);
|
||||
wakeup(TSA_CARR_ON(tp));
|
||||
|
||||
splx(oldspl);
|
||||
@ -1416,7 +1416,7 @@ si_write_enable(struct si_port *pp, int state)
|
||||
if (pp->sp_state & SS_WAITWRITE) {
|
||||
pp->sp_state &= ~SS_WAITWRITE;
|
||||
/* thunder away! */
|
||||
wakeup((caddr_t)pp);
|
||||
wakeup(pp);
|
||||
}
|
||||
} else {
|
||||
pp->sp_state |= SS_BLOCKWRITE;
|
||||
|
@ -257,7 +257,7 @@ snpread(dev, uio, flag)
|
||||
if (flag & IO_NDELAY)
|
||||
return (EWOULDBLOCK);
|
||||
snp->snp_flags |= SNOOP_RWAIT;
|
||||
error = tsleep((caddr_t)snp, (PZERO + 1) | PCATCH,
|
||||
error = tsleep(snp, (PZERO + 1) | PCATCH,
|
||||
"snprd", 0);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
@ -351,7 +351,7 @@ snp_in(snp, buf, n)
|
||||
snp->snp_flags |= SNOOP_OFLOW;
|
||||
if (snp->snp_flags & SNOOP_RWAIT) {
|
||||
snp->snp_flags &= ~SNOOP_RWAIT;
|
||||
wakeup((caddr_t)snp);
|
||||
wakeup(snp);
|
||||
}
|
||||
splx(s);
|
||||
return (0);
|
||||
@ -371,7 +371,7 @@ snp_in(snp, buf, n)
|
||||
|
||||
if (snp->snp_flags & SNOOP_RWAIT) {
|
||||
snp->snp_flags &= ~SNOOP_RWAIT;
|
||||
wakeup((caddr_t)snp);
|
||||
wakeup(snp);
|
||||
}
|
||||
selwakeup(&snp->snp_sel);
|
||||
|
||||
|
@ -140,7 +140,7 @@ tone(thz, ticks)
|
||||
* emitted.
|
||||
*/
|
||||
if (ticks > 0)
|
||||
tsleep((caddr_t)&endtone, SPKRPRI | PCATCH, "spkrtn", ticks);
|
||||
tsleep(&endtone, SPKRPRI | PCATCH, "spkrtn", ticks);
|
||||
SPEAKER_OFF;
|
||||
sps = splclock();
|
||||
TIMER_RELEASE;
|
||||
@ -161,7 +161,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 **********************
|
||||
@ -548,8 +548,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);
|
||||
|
@ -1012,7 +1012,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;
|
||||
|
||||
@ -2089,7 +2089,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
|
||||
@ -2103,7 +2103,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;
|
||||
}
|
||||
@ -2302,7 +2302,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;
|
||||
@ -2325,7 +2325,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)) {
|
||||
@ -2351,7 +2351,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)) {
|
||||
|
@ -547,7 +547,7 @@ ulptopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
|
||||
}
|
||||
|
||||
/* wait 1/4 second, give up if we get a signal */
|
||||
error = tsleep((caddr_t)sc, LPTPRI | PCATCH, "ulptop", STEP);
|
||||
error = tsleep(sc, LPTPRI | PCATCH, "ulptop", STEP);
|
||||
if (error != EWOULDBLOCK) {
|
||||
sc->sc_state = 0;
|
||||
goto done;
|
||||
|
@ -429,7 +429,7 @@ usbd_bulk_transfer(usbd_xfer_handle xfer, usbd_pipe_handle pipe,
|
||||
splx(s);
|
||||
return (err);
|
||||
}
|
||||
error = tsleep((caddr_t)xfer, PZERO | PCATCH, lbl, 0);
|
||||
error = tsleep(xfer, PZERO | PCATCH, lbl, 0);
|
||||
splx(s);
|
||||
if (error) {
|
||||
DPRINTF(("usbd_bulk_transfer: tsleep=%d\n", error));
|
||||
@ -471,7 +471,7 @@ usbd_intr_transfer(usbd_xfer_handle xfer, usbd_pipe_handle pipe,
|
||||
splx(s);
|
||||
return (err);
|
||||
}
|
||||
error = tsleep((caddr_t)xfer, PZERO | PCATCH, lbl, 0);
|
||||
error = tsleep(xfer, PZERO | PCATCH, lbl, 0);
|
||||
splx(s);
|
||||
if (error) {
|
||||
DPRINTF(("usbd_intr_transfer: tsleep=%d\n", error));
|
||||
|
@ -122,7 +122,7 @@ fdesc_allocvp(ftype, ix, mp, vpp, td)
|
||||
*/
|
||||
if (fdcache_lock & FDL_LOCKED) {
|
||||
fdcache_lock |= FDL_WANT;
|
||||
(void) tsleep((caddr_t) &fdcache_lock, PINOD, "fdalvp", 0);
|
||||
(void) tsleep( &fdcache_lock, PINOD, "fdalvp", 0);
|
||||
goto loop;
|
||||
}
|
||||
fdcache_lock |= FDL_LOCKED;
|
||||
@ -151,7 +151,7 @@ fdesc_allocvp(ftype, ix, mp, vpp, td)
|
||||
|
||||
if (fdcache_lock & FDL_WANT) {
|
||||
fdcache_lock &= ~FDL_WANT;
|
||||
wakeup((caddr_t) &fdcache_lock);
|
||||
wakeup( &fdcache_lock);
|
||||
}
|
||||
|
||||
return (error);
|
||||
|
@ -210,7 +210,7 @@ fifo_open(ap)
|
||||
if (fip->fi_readers == 1) {
|
||||
fip->fi_writesock->so_state &= ~SS_CANTSENDMORE;
|
||||
if (fip->fi_writers > 0) {
|
||||
wakeup((caddr_t)&fip->fi_writers);
|
||||
wakeup(&fip->fi_writers);
|
||||
sowwakeup(fip->fi_writesock);
|
||||
}
|
||||
}
|
||||
@ -220,7 +220,7 @@ fifo_open(ap)
|
||||
if (fip->fi_writers == 1) {
|
||||
fip->fi_readsock->so_state &= ~SS_CANTRCVMORE;
|
||||
if (fip->fi_readers > 0) {
|
||||
wakeup((caddr_t)&fip->fi_readers);
|
||||
wakeup(&fip->fi_readers);
|
||||
sorwakeup(fip->fi_writesock);
|
||||
}
|
||||
}
|
||||
@ -228,7 +228,7 @@ fifo_open(ap)
|
||||
if ((ap->a_mode & FREAD) && (ap->a_mode & O_NONBLOCK) == 0) {
|
||||
while (fip->fi_writers == 0) {
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
error = tsleep((caddr_t)&fip->fi_readers,
|
||||
error = tsleep(&fip->fi_readers,
|
||||
PCATCH | PSOCK, "fifoor", 0);
|
||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
if (error)
|
||||
@ -249,7 +249,7 @@ fifo_open(ap)
|
||||
* by timing out after a sec. Race seen when
|
||||
* sendmail hangs here during boot /phk
|
||||
*/
|
||||
error = tsleep((caddr_t)&fip->fi_writers,
|
||||
error = tsleep(&fip->fi_writers,
|
||||
PCATCH | PSOCK, "fifoow", hz);
|
||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
if (error)
|
||||
|
@ -617,7 +617,7 @@ nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
|
||||
}
|
||||
while (np->n_flag & NFLUSHINPROG) {
|
||||
np->n_flag |= NFLUSHWANT;
|
||||
error = tsleep((caddr_t)&np->n_flag, PRIBIO + 2, "nwfsvinv", slptimeo);
|
||||
error = tsleep(&np->n_flag, PRIBIO + 2, "nwfsvinv", slptimeo);
|
||||
error = ncp_chkintr(NWFSTOCONN(VTONWFS(vp)), td);
|
||||
if (error == EINTR && intrflg)
|
||||
return EINTR;
|
||||
@ -629,7 +629,7 @@ nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
|
||||
np->n_flag &= ~NFLUSHINPROG;
|
||||
if (np->n_flag & NFLUSHWANT) {
|
||||
np->n_flag &= ~NFLUSHWANT;
|
||||
wakeup((caddr_t)&np->n_flag);
|
||||
wakeup(&np->n_flag);
|
||||
}
|
||||
return EINTR;
|
||||
}
|
||||
@ -638,7 +638,7 @@ nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
|
||||
np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
|
||||
if (np->n_flag & NFLUSHWANT) {
|
||||
np->n_flag &= ~NFLUSHWANT;
|
||||
wakeup((caddr_t)&np->n_flag);
|
||||
wakeup(&np->n_flag);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
@ -687,7 +687,7 @@ smbfs_vinvalbuf(vp, flags, cred, td, intrflg)
|
||||
}
|
||||
while (np->n_flag & NFLUSHINPROG) {
|
||||
np->n_flag |= NFLUSHWANT;
|
||||
error = tsleep((caddr_t)&np->n_flag, PRIBIO + 2, "smfsvinv", slptimeo);
|
||||
error = tsleep(&np->n_flag, PRIBIO + 2, "smfsvinv", slptimeo);
|
||||
error = smb_proc_intr(td->td_proc);
|
||||
if (error == EINTR && intrflg)
|
||||
return EINTR;
|
||||
@ -699,7 +699,7 @@ smbfs_vinvalbuf(vp, flags, cred, td, intrflg)
|
||||
np->n_flag &= ~NFLUSHINPROG;
|
||||
if (np->n_flag & NFLUSHWANT) {
|
||||
np->n_flag &= ~NFLUSHWANT;
|
||||
wakeup((caddr_t)&np->n_flag);
|
||||
wakeup(&np->n_flag);
|
||||
}
|
||||
return EINTR;
|
||||
}
|
||||
@ -708,7 +708,7 @@ smbfs_vinvalbuf(vp, flags, cred, td, intrflg)
|
||||
np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
|
||||
if (np->n_flag & NFLUSHWANT) {
|
||||
np->n_flag &= ~NFLUSHWANT;
|
||||
wakeup((caddr_t)&np->n_flag);
|
||||
wakeup(&np->n_flag);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ union_list_lock(ix)
|
||||
{
|
||||
if (unvplock[ix] & UNVP_LOCKED) {
|
||||
unvplock[ix] |= UNVP_WANT;
|
||||
(void) tsleep((caddr_t) &unvplock[ix], PINOD, "unllck", 0);
|
||||
(void) tsleep( &unvplock[ix], PINOD, "unllck", 0);
|
||||
return (1);
|
||||
}
|
||||
unvplock[ix] |= UNVP_LOCKED;
|
||||
@ -127,7 +127,7 @@ union_list_unlock(ix)
|
||||
|
||||
if (unvplock[ix] & UNVP_WANT) {
|
||||
unvplock[ix] &= ~UNVP_WANT;
|
||||
wakeup((caddr_t) &unvplock[ix]);
|
||||
wakeup( &unvplock[ix]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,10 +232,10 @@ get_resolution(struct asc_unit *scu)
|
||||
res=0;
|
||||
scu->cmd_byte = ASC_STANDBY;
|
||||
outb(ASC_CMD, scu->cmd_byte);
|
||||
tsleep((caddr_t)scu, ASCPRI | PCATCH, "ascres", hz/10);
|
||||
tsleep(scu, ASCPRI | PCATCH, "ascres", hz/10);
|
||||
for(delay= 100; (res=inb(ASC_STAT)) & ASC_RDY_FLAG; delay--)
|
||||
{
|
||||
i = tsleep((caddr_t)scu, ASCPRI | PCATCH, "ascres0", 1);
|
||||
i = tsleep(scu, ASCPRI | PCATCH, "ascres0", 1);
|
||||
if ( ( i == 0 ) || ( i == EWOULDBLOCK ) )
|
||||
i = SUCCESS;
|
||||
else
|
||||
@ -352,7 +352,7 @@ asc_reset(struct asc_unit *scu)
|
||||
|
||||
outb(ASC_CFG,scu->cfg_byte); /* for safety, do this here */
|
||||
outb(ASC_CMD,scu->cmd_byte); /* probably not needed */
|
||||
tsleep((caddr_t)scu, ASCPRI | PCATCH, "ascres", hz/10); /* sleep .1 sec */
|
||||
tsleep(scu, ASCPRI | PCATCH, "ascres", hz/10); /* sleep .1 sec */
|
||||
|
||||
scu->blen = DEFAULT_BLEN;
|
||||
scu->btime = TIMEOUT;
|
||||
@ -525,7 +525,7 @@ ascintr(int unit)
|
||||
scu->sbuf.count += scu->linesize;
|
||||
if (scu->flags & SLEEPING) {
|
||||
scu->flags &= ~SLEEPING;
|
||||
wakeup((caddr_t)scu);
|
||||
wakeup(scu);
|
||||
}
|
||||
if (scu->sbuf.size - scu->sbuf.count >= scu->linesize) {
|
||||
dma_restart(scu);
|
||||
@ -628,7 +628,7 @@ asc_startread(struct asc_unit *scu)
|
||||
/*** sub_28: light on etc...***/
|
||||
scu->cmd_byte = ASC_STANDBY;
|
||||
outb(ASC_CMD, scu->cmd_byte);
|
||||
tsleep((caddr_t)scu, ASCPRI | PCATCH, "ascstrd", hz/10); /* sleep .1 sec */
|
||||
tsleep(scu, ASCPRI | PCATCH, "ascstrd", hz/10); /* sleep .1 sec */
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@ -658,7 +658,7 @@ ascclose(dev_t dev, int flags, int fmt, struct thread *td)
|
||||
outb(ASC_CFG, 0 ); /* don't save in CFG byte!!! */
|
||||
scu->cmd_byte &= ~ASC_LIGHT_ON;
|
||||
outb(ASC_CMD, scu->cmd_byte);/* light off */
|
||||
tsleep((caddr_t)scu, ASCPRI | PCATCH, "ascclo", hz/2); /* sleep 1/2 sec */
|
||||
tsleep(scu, ASCPRI | PCATCH, "ascclo", hz/2); /* sleep 1/2 sec */
|
||||
scu->cfg_byte &= ~ scu->dma_byte ; /* disable scanner dma */
|
||||
scu->cfg_byte &= ~ scu->int_byte ; /* disable scanner int */
|
||||
outb(ASC_CFG, scu->cfg_byte);
|
||||
@ -734,13 +734,13 @@ ascread(dev_t dev, struct uio *uio, int ioflag)
|
||||
if ( scu->sbuf.count == 0 ) { /* no data avail., must wait */
|
||||
if (!(scu->flags & DMA_ACTIVE)) dma_restart(scu);
|
||||
scu->flags |= SLEEPING;
|
||||
res = tsleep((caddr_t)scu, ASCPRI | PCATCH, "ascread", 0);
|
||||
res = tsleep(scu, ASCPRI | PCATCH, "ascread", 0);
|
||||
scu->flags &= ~SLEEPING;
|
||||
if ( res == 0 ) res = SUCCESS;
|
||||
}
|
||||
splx(sps); /* lower priority... */
|
||||
if (scu->flags & FLAG_DEBUG)
|
||||
tsleep((caddr_t)scu, ASCPRI | PCATCH, "ascdly",hz);
|
||||
tsleep(scu, ASCPRI | PCATCH, "ascdly",hz);
|
||||
lprintf("asc%d.read(after): "
|
||||
"sz 0x%x, rptr 0x%x, wptr 0x%x, cnt 0x%x bcnt 0x%x flags 0x%x icnt %ld\n",
|
||||
unit, scu->sbuf.size, scu->sbuf.rptr,
|
||||
|
@ -358,7 +358,7 @@ loranread(dev_t dev, struct uio * uio, int ioflag)
|
||||
return(EIO);
|
||||
}
|
||||
if (TAILQ_EMPTY(&minors[idx]))
|
||||
tsleep ((caddr_t)&minors[idx], (PZERO + 8) |PCATCH, "loranrd", hz*2);
|
||||
tsleep (&minors[idx], (PZERO + 8) |PCATCH, "loranrd", hz*2);
|
||||
if (TAILQ_EMPTY(&minors[idx]))
|
||||
return(0);
|
||||
this = TAILQ_FIRST(&minors[idx]);
|
||||
@ -563,7 +563,7 @@ loranintr(int unit)
|
||||
done->vco = vco_is;
|
||||
done->when = there;
|
||||
TAILQ_INSERT_TAIL(done->home, done, list);
|
||||
wakeup((caddr_t)done->home);
|
||||
wakeup(done->home);
|
||||
}
|
||||
|
||||
ticker = first->scheduled;
|
||||
|
@ -474,7 +474,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);
|
||||
@ -753,7 +753,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);
|
||||
}
|
||||
|
@ -2353,13 +2353,13 @@ vgapage(int new_screen)
|
||||
if(old_vsp->vt_status & VT_WAIT_ACT)
|
||||
{
|
||||
old_vsp->vt_status &= ~VT_WAIT_ACT;
|
||||
wakeup((caddr_t)&old_vsp->smode);
|
||||
wakeup(&old_vsp->smode);
|
||||
}
|
||||
|
||||
if(vsp->vt_status & VT_WAIT_ACT)
|
||||
{
|
||||
vsp->vt_status &= ~VT_WAIT_ACT;
|
||||
wakeup((caddr_t)&vsp->smode);
|
||||
wakeup(&vsp->smode);
|
||||
}
|
||||
|
||||
splx(x);
|
||||
@ -2514,12 +2514,12 @@ usl_vt_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct thread *td)
|
||||
if(old_vsp->vt_status & VT_WAIT_ACT)
|
||||
{
|
||||
old_vsp->vt_status &= ~VT_WAIT_ACT;
|
||||
wakeup((caddr_t)&old_vsp->smode);
|
||||
wakeup(&old_vsp->smode);
|
||||
}
|
||||
if(vsp->vt_status & VT_WAIT_ACT)
|
||||
{
|
||||
vsp->vt_status &= ~VT_WAIT_ACT;
|
||||
wakeup((caddr_t)&vsp->smode);
|
||||
wakeup(&vsp->smode);
|
||||
}
|
||||
splx(opri);
|
||||
|
||||
@ -2606,7 +2606,7 @@ usl_vt_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct thread *td)
|
||||
(error == 0 || error == ERESTART))
|
||||
{
|
||||
vs[i].vt_status |= VT_WAIT_ACT;
|
||||
error = tsleep((caddr_t)&vs[i].smode,
|
||||
error = tsleep(&vs[i].smode,
|
||||
PZERO | PCATCH, "waitvt", 0);
|
||||
}
|
||||
splx(x);
|
||||
|
@ -1066,7 +1066,7 @@ sgetc(int noblock)
|
||||
if(!(vsp->scroll_lock))
|
||||
{
|
||||
/* someone may be sleeping */
|
||||
wakeup((caddr_t)&(vsp->scroll_lock));
|
||||
wakeup(&(vsp->scroll_lock));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -436,7 +436,7 @@ spictimeout(void *arg)
|
||||
if (sc->sc_count) {
|
||||
if (sc->sc_sleeping) {
|
||||
sc->sc_sleeping = 0;
|
||||
wakeup((caddr_t) sc);
|
||||
wakeup( sc);
|
||||
}
|
||||
selwakeup(&sc->sc_rsel);
|
||||
}
|
||||
@ -491,7 +491,7 @@ spicread(dev_t dev, struct uio *uio, int flag)
|
||||
s = spltty();
|
||||
while (!(sc->sc_count)) {
|
||||
sc->sc_sleeping=1;
|
||||
error = tsleep((caddr_t) sc, PZERO | PCATCH, "jogrea", 0);
|
||||
error = tsleep( sc, PZERO | PCATCH, "jogrea", 0);
|
||||
sc->sc_sleeping=0;
|
||||
if (error) {
|
||||
splx(s);
|
||||
|
@ -140,7 +140,7 @@ tone(thz, ticks)
|
||||
* emitted.
|
||||
*/
|
||||
if (ticks > 0)
|
||||
tsleep((caddr_t)&endtone, SPKRPRI | PCATCH, "spkrtn", ticks);
|
||||
tsleep(&endtone, SPKRPRI | PCATCH, "spkrtn", ticks);
|
||||
SPEAKER_OFF;
|
||||
sps = splclock();
|
||||
TIMER_RELEASE;
|
||||
@ -161,7 +161,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 **********************
|
||||
@ -548,8 +548,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);
|
||||
|
@ -520,7 +520,7 @@ twwrite(dev, uio, ioflag)
|
||||
* originated locally.
|
||||
*/
|
||||
while(sc->sc_state & (TWS_RCVING | TWS_XMITTING)) {
|
||||
error = tsleep((caddr_t)sc, TWPRI|PCATCH, "twwrite", 0);
|
||||
error = tsleep(sc, TWPRI|PCATCH, "twwrite", 0);
|
||||
if(error) {
|
||||
splx(s);
|
||||
return(error);
|
||||
@ -534,7 +534,7 @@ twwrite(dev, uio, ioflag)
|
||||
error = twsend(sc, house, key, reps);
|
||||
s = spltty();
|
||||
sc->sc_state &= ~TWS_XMITTING;
|
||||
wakeup((caddr_t)sc);
|
||||
wakeup(sc);
|
||||
splx(s);
|
||||
if(error) return(EIO);
|
||||
else return(0);
|
||||
@ -852,7 +852,7 @@ u_char *p;
|
||||
}
|
||||
if(sc->sc_state & TWS_WANT) {
|
||||
sc->sc_state &= ~TWS_WANT;
|
||||
wakeup((caddr_t)(&sc->sc_buf));
|
||||
wakeup((&sc->sc_buf));
|
||||
}
|
||||
selwakeup(&sc->sc_selp);
|
||||
return(0);
|
||||
@ -873,7 +873,7 @@ int cnt;
|
||||
while(cnt--) {
|
||||
while(sc->sc_nextin == sc->sc_nextout) { /* Buffer empty */
|
||||
sc->sc_state |= TWS_WANT;
|
||||
error = tsleep((caddr_t)(&sc->sc_buf), TWPRI|PCATCH, "twread", 0);
|
||||
error = tsleep((&sc->sc_buf), TWPRI|PCATCH, "twread", 0);
|
||||
if(error) {
|
||||
return(error);
|
||||
}
|
||||
@ -907,7 +907,7 @@ twabortrcv(arg)
|
||||
log(LOG_ERR, "TWRCV: aborting (%x, %d)\n", sc->sc_bits, sc->sc_rcount);
|
||||
twdebugtimes(sc);
|
||||
}
|
||||
wakeup((caddr_t)sc);
|
||||
wakeup(sc);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
@ -1105,7 +1105,7 @@ int unit;
|
||||
sc->sc_rcount, sc->sc_bits, 'A' + pkt[1], X10_KEY_LABEL[pkt[2]]); */
|
||||
}
|
||||
sc->sc_rcount = 0;
|
||||
wakeup((caddr_t)sc);
|
||||
wakeup(sc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -614,7 +614,7 @@ wtintr (int u)
|
||||
"rewind busy?\n" : "rewind finished\n"));
|
||||
t->flags &= ~TPREW; /* Rewind finished. */
|
||||
wtsense (t, 1, TP_WRP);
|
||||
wakeup ((caddr_t)t);
|
||||
wakeup (t);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -627,7 +627,7 @@ wtintr (int u)
|
||||
if (! (s & t->NOEXCEP)) /* operation failed */
|
||||
wtsense (t, 1, (t->flags & TPRMARK) ? TP_WRP : 0);
|
||||
t->flags &= ~(TPRMARK | TPWMARK); /* operation finished */
|
||||
wakeup ((caddr_t)t);
|
||||
wakeup (t);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -664,7 +664,7 @@ wtintr (int u)
|
||||
t->flags |= TPVOL; /* end of file */
|
||||
else
|
||||
t->flags |= TPEXCEP; /* i/o error */
|
||||
wakeup ((caddr_t)t);
|
||||
wakeup (t);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -675,7 +675,7 @@ wtintr (int u)
|
||||
}
|
||||
if (t->dmacount > t->dmatotal) /* short last block */
|
||||
t->dmacount = t->dmatotal;
|
||||
wakeup ((caddr_t)t); /* wake up user level */
|
||||
wakeup (t); /* wake up user level */
|
||||
TRACE (("i/o finished, %d\n", t->dmacount));
|
||||
}
|
||||
|
||||
@ -719,7 +719,7 @@ wtreadfm (wtinfo_t *t)
|
||||
static int
|
||||
wtwritefm (wtinfo_t *t)
|
||||
{
|
||||
tsleep ((caddr_t)wtwritefm, WTPRI, "wtwfm", hz); /* timeout: 1 second */
|
||||
tsleep (wtwritefm, WTPRI, "wtwfm", hz); /* timeout: 1 second */
|
||||
t->flags &= ~(TPRO | TPWO);
|
||||
if (! wtcmd (t, QIC_WRITEFM)) {
|
||||
wtsense (t, 1, 0);
|
||||
@ -753,7 +753,7 @@ wtpoll (wtinfo_t *t, int mask, int bits)
|
||||
s = inb (t->STATPORT);
|
||||
if ((s & mask) != bits)
|
||||
return (s);
|
||||
tsleep ((caddr_t)wtpoll, WTPRI, "wtpoll", 1); /* timeout: 1 tick */
|
||||
tsleep (wtpoll, WTPRI, "wtpoll", 1); /* timeout: 1 tick */
|
||||
}
|
||||
}
|
||||
|
||||
@ -789,7 +789,7 @@ wtwait (wtinfo_t *t, int catch, char *msg)
|
||||
|
||||
TRACE (("wtwait() `%s'\n", msg));
|
||||
while (t->flags & (TPACTIVE | TPREW | TPRMARK | TPWMARK)) {
|
||||
error = tsleep ((caddr_t)t, WTPRI | catch, msg, 0);
|
||||
error = tsleep (t, WTPRI | catch, msg, 0);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -1614,7 +1614,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) {
|
||||
@ -1720,7 +1720,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);
|
||||
@ -1752,7 +1752,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");
|
||||
|
@ -1528,7 +1528,7 @@ psmread(dev_t dev, struct uio *uio, int flag)
|
||||
return EWOULDBLOCK;
|
||||
}
|
||||
sc->state |= PSM_ASLP;
|
||||
error = tsleep((caddr_t) sc, PZERO | PCATCH, "psmrea", 0);
|
||||
error = tsleep( sc, PZERO | PCATCH, "psmrea", 0);
|
||||
sc->state &= ~PSM_ASLP;
|
||||
if (error) {
|
||||
splx(s);
|
||||
@ -2366,7 +2366,7 @@ psmintr(void *arg)
|
||||
|
||||
if (sc->state & PSM_ASLP) {
|
||||
sc->state &= ~PSM_ASLP;
|
||||
wakeup((caddr_t) sc);
|
||||
wakeup( sc);
|
||||
}
|
||||
selwakeup(&sc->rsel);
|
||||
}
|
||||
@ -2821,7 +2821,7 @@ psmresume(device_t dev)
|
||||
* cannot be accessed anymore.
|
||||
*/
|
||||
sc->state &= ~PSM_ASLP;
|
||||
wakeup((caddr_t)sc);
|
||||
wakeup(sc);
|
||||
}
|
||||
|
||||
if (verbose >= 2)
|
||||
|
@ -197,7 +197,7 @@ logtimeout(void *arg)
|
||||
if ((logsoftc.sc_state & LOG_ASYNC) && logsoftc.sc_sigio != NULL)
|
||||
pgsigio(&logsoftc.sc_sigio, SIGIO, 0);
|
||||
if (logsoftc.sc_state & LOG_RDWAIT) {
|
||||
wakeup((caddr_t)msgbufp);
|
||||
wakeup(msgbufp);
|
||||
logsoftc.sc_state &= ~LOG_RDWAIT;
|
||||
}
|
||||
callout_reset(&logsoftc.sc_callout, hz / log_wakeups_per_second,
|
||||
|
@ -457,7 +457,7 @@ bpfread(dev, uio, ioflag)
|
||||
BPFD_UNLOCK(d);
|
||||
return (EWOULDBLOCK);
|
||||
}
|
||||
error = msleep((caddr_t)d, &d->bd_mtx, PRINET|PCATCH,
|
||||
error = msleep(d, &d->bd_mtx, PRINET|PCATCH,
|
||||
"bpf", d->bd_rtout);
|
||||
if (error == EINTR || error == ERESTART) {
|
||||
BPFD_UNLOCK(d);
|
||||
@ -518,7 +518,7 @@ bpf_wakeup(d)
|
||||
callout_stop(&d->bd_callout);
|
||||
d->bd_state = BPF_IDLE;
|
||||
}
|
||||
wakeup((caddr_t)d);
|
||||
wakeup(d);
|
||||
if (d->bd_async && d->bd_sig && d->bd_sigio)
|
||||
pgsigio(&d->bd_sigio, d->bd_sig, 0);
|
||||
|
||||
|
@ -607,7 +607,7 @@ tapifstart(ifp)
|
||||
if (ifp->if_snd.ifq_len != 0) {
|
||||
if (tp->tap_flags & TAP_RWAIT) {
|
||||
tp->tap_flags &= ~TAP_RWAIT;
|
||||
wakeup((caddr_t)tp);
|
||||
wakeup(tp);
|
||||
}
|
||||
|
||||
if ((tp->tap_flags & TAP_ASYNC) && (tp->tap_sigio != NULL))
|
||||
@ -779,7 +779,7 @@ tapread(dev, uio, flag)
|
||||
return (EWOULDBLOCK);
|
||||
|
||||
tp->tap_flags |= TAP_RWAIT;
|
||||
error = tsleep((caddr_t)tp,PCATCH|(PZERO+1),"taprd",0);
|
||||
error = tsleep(tp,PCATCH|(PZERO+1),"taprd",0);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ tunstart(struct ifnet *ifp)
|
||||
|
||||
if (tp->tun_flags & TUN_RWAIT) {
|
||||
tp->tun_flags &= ~TUN_RWAIT;
|
||||
wakeup((caddr_t)tp);
|
||||
wakeup(tp);
|
||||
}
|
||||
if (tp->tun_flags & TUN_ASYNC && tp->tun_sigio)
|
||||
pgsigio(&tp->tun_sigio, SIGIO, 0);
|
||||
@ -664,7 +664,7 @@ tunread(dev_t dev, struct uio *uio, int flag)
|
||||
return (EWOULDBLOCK);
|
||||
}
|
||||
tp->tun_flags |= TUN_RWAIT;
|
||||
if((error = tsleep((caddr_t)tp, PCATCH | (PZERO + 1),
|
||||
if((error = tsleep(tp, PCATCH | (PZERO + 1),
|
||||
"tunread", 0)) != 0) {
|
||||
splx(s);
|
||||
return (error);
|
||||
|
@ -872,7 +872,7 @@ tcp_notify(inp, error)
|
||||
return inp;
|
||||
}
|
||||
#if 0
|
||||
wakeup((caddr_t) &so->so_timeo);
|
||||
wakeup( &so->so_timeo);
|
||||
sorwakeup(so);
|
||||
sowwakeup(so);
|
||||
#endif
|
||||
|
@ -872,7 +872,7 @@ tcp_notify(inp, error)
|
||||
return inp;
|
||||
}
|
||||
#if 0
|
||||
wakeup((caddr_t) &so->so_timeo);
|
||||
wakeup( &so->so_timeo);
|
||||
sorwakeup(so);
|
||||
sowwakeup(so);
|
||||
#endif
|
||||
|
@ -1085,7 +1085,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
|
||||
*/
|
||||
while (np->n_flag & NFLUSHINPROG) {
|
||||
np->n_flag |= NFLUSHWANT;
|
||||
error = tsleep((caddr_t)&np->n_flag, PRIBIO + 2, "nfsvinval",
|
||||
error = tsleep(&np->n_flag, PRIBIO + 2, "nfsvinval",
|
||||
slptimeo);
|
||||
if (error && intrflg &&
|
||||
nfs_sigintr(nmp, NULL, td))
|
||||
@ -1103,7 +1103,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
|
||||
np->n_flag &= ~NFLUSHINPROG;
|
||||
if (np->n_flag & NFLUSHWANT) {
|
||||
np->n_flag &= ~NFLUSHWANT;
|
||||
wakeup((caddr_t)&np->n_flag);
|
||||
wakeup(&np->n_flag);
|
||||
}
|
||||
return (EINTR);
|
||||
}
|
||||
@ -1112,7 +1112,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
|
||||
np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
|
||||
if (np->n_flag & NFLUSHWANT) {
|
||||
np->n_flag &= ~NFLUSHWANT;
|
||||
wakeup((caddr_t)&np->n_flag);
|
||||
wakeup(&np->n_flag);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
@ -1180,7 +1180,7 @@ nfs_asyncio(struct buf *bp, struct ucred *cred, struct thread *td)
|
||||
nfs_iodwant[iod] = NULL;
|
||||
nfs_iodmount[iod] = nmp;
|
||||
nmp->nm_bufqiods++;
|
||||
wakeup((caddr_t)&nfs_iodwant[iod]);
|
||||
wakeup(&nfs_iodwant[iod]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -144,7 +144,7 @@ sysctl_iodmax(SYSCTL_HANDLER_ARGS)
|
||||
iod = nfs_numasync - 1;
|
||||
for (i = 0; i < nfs_numasync - nfs_iodmax; i++) {
|
||||
if (nfs_iodwant[iod])
|
||||
wakeup((caddr_t)&nfs_iodwant[iod]);
|
||||
wakeup(&nfs_iodwant[iod]);
|
||||
iod--;
|
||||
}
|
||||
return (0);
|
||||
@ -244,7 +244,7 @@ nfssvc_iod(void *instance)
|
||||
* Always keep at least nfs_iodmin kthreads.
|
||||
*/
|
||||
timo = (myiod < nfs_iodmin) ? 0 : nfs_iodmaxidle * hz;
|
||||
error = tsleep((caddr_t)&nfs_iodwant[myiod], PWAIT | PCATCH,
|
||||
error = tsleep(&nfs_iodwant[myiod], PWAIT | PCATCH,
|
||||
"nfsidl", timo);
|
||||
}
|
||||
if (error)
|
||||
|
@ -241,7 +241,7 @@ nfs_connect(struct nfsmount *nmp, struct nfsreq *rep)
|
||||
*/
|
||||
s = splnet();
|
||||
while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) {
|
||||
(void) tsleep((caddr_t)&so->so_timeo,
|
||||
(void) tsleep(&so->so_timeo,
|
||||
PSOCK, "nfscon", 2 * hz);
|
||||
if ((so->so_state & SS_ISCONNECTING) &&
|
||||
so->so_error == 0 && rep &&
|
||||
@ -353,7 +353,7 @@ nfs_reconnect(struct nfsreq *rep)
|
||||
while ((error = nfs_connect(nmp, rep)) != 0) {
|
||||
if (error == EINTR || error == ERESTART)
|
||||
return (EINTR);
|
||||
(void) tsleep((caddr_t)&lbolt, PSOCK, "nfscon", 0);
|
||||
(void) tsleep(&lbolt, PSOCK, "nfscon", 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1013,7 +1013,7 @@ nfs_request(struct vnode *vp, struct mbuf *mrest, int procnum,
|
||||
error = 0;
|
||||
waituntil = time_second + trylater_delay;
|
||||
while (time_second < waituntil)
|
||||
(void) tsleep((caddr_t)&lbolt,
|
||||
(void) tsleep(&lbolt,
|
||||
PSOCK, "nqnfstry", 0);
|
||||
trylater_delay *= nfs_backoff[trylater_cnt];
|
||||
if (trylater_cnt < NFS_NBACKOFF - 1)
|
||||
@ -1272,7 +1272,7 @@ nfs_sndlock(struct nfsreq *rep)
|
||||
if (nfs_sigintr(rep->r_nmp, rep, td))
|
||||
return (EINTR);
|
||||
*statep |= NFSSTA_WANTSND;
|
||||
(void) tsleep((caddr_t)statep, slpflag | (PZERO - 1),
|
||||
(void) tsleep(statep, slpflag | (PZERO - 1),
|
||||
"nfsndlck", slptimeo);
|
||||
if (slpflag == PCATCH) {
|
||||
slpflag = 0;
|
||||
@ -1296,7 +1296,7 @@ nfs_sndunlock(struct nfsreq *rep)
|
||||
*statep &= ~NFSSTA_SNDLOCK;
|
||||
if (*statep & NFSSTA_WANTSND) {
|
||||
*statep &= ~NFSSTA_WANTSND;
|
||||
wakeup((caddr_t)statep);
|
||||
wakeup(statep);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1314,7 +1314,7 @@ nfs_rcvlock(struct nfsreq *rep)
|
||||
if (nfs_sigintr(rep->r_nmp, rep, rep->r_td))
|
||||
return (EINTR);
|
||||
*statep |= NFSSTA_WANTRCV;
|
||||
(void) tsleep((caddr_t)statep, slpflag | (PZERO - 1), "nfsrcvlk",
|
||||
(void) tsleep(statep, slpflag | (PZERO - 1), "nfsrcvlk",
|
||||
slptimeo);
|
||||
/*
|
||||
* If our reply was recieved while we were sleeping,
|
||||
@ -1349,7 +1349,7 @@ nfs_rcvunlock(struct nfsreq *rep)
|
||||
*statep &= ~NFSSTA_RCVLOCK;
|
||||
if (*statep & NFSSTA_WANTRCV) {
|
||||
*statep &= ~NFSSTA_WANTRCV;
|
||||
wakeup((caddr_t)statep);
|
||||
wakeup(statep);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ nfsrv_getcache(struct nfsrv_descript *nd, struct mbuf **repp)
|
||||
NFS_DPF(RC, ("H%03x", rp->rc_xid & 0xfff));
|
||||
if ((rp->rc_flag & RC_LOCKED) != 0) {
|
||||
rp->rc_flag |= RC_WANTED;
|
||||
(void) tsleep((caddr_t)rp, PZERO-1, "nfsrc", 0);
|
||||
(void) tsleep(rp, PZERO-1, "nfsrc", 0);
|
||||
goto loop;
|
||||
}
|
||||
rp->rc_flag |= RC_LOCKED;
|
||||
@ -203,7 +203,7 @@ nfsrv_getcache(struct nfsrv_descript *nd, struct mbuf **repp)
|
||||
rp->rc_flag &= ~RC_LOCKED;
|
||||
if (rp->rc_flag & RC_WANTED) {
|
||||
rp->rc_flag &= ~RC_WANTED;
|
||||
wakeup((caddr_t)rp);
|
||||
wakeup(rp);
|
||||
}
|
||||
return (ret);
|
||||
}
|
||||
@ -219,7 +219,7 @@ nfsrv_getcache(struct nfsrv_descript *nd, struct mbuf **repp)
|
||||
rp = TAILQ_FIRST(&nfsrvlruhead);
|
||||
while ((rp->rc_flag & RC_LOCKED) != 0) {
|
||||
rp->rc_flag |= RC_WANTED;
|
||||
(void) tsleep((caddr_t)rp, PZERO-1, "nfsrc", 0);
|
||||
(void) tsleep(rp, PZERO-1, "nfsrc", 0);
|
||||
rp = TAILQ_FIRST(&nfsrvlruhead);
|
||||
}
|
||||
rp->rc_flag |= RC_LOCKED;
|
||||
@ -252,7 +252,7 @@ nfsrv_getcache(struct nfsrv_descript *nd, struct mbuf **repp)
|
||||
rp->rc_flag &= ~RC_LOCKED;
|
||||
if (rp->rc_flag & RC_WANTED) {
|
||||
rp->rc_flag &= ~RC_WANTED;
|
||||
wakeup((caddr_t)rp);
|
||||
wakeup(rp);
|
||||
}
|
||||
return (RC_DOIT);
|
||||
}
|
||||
@ -274,7 +274,7 @@ nfsrv_updatecache(struct nfsrv_descript *nd, int repvalid, struct mbuf *repmbuf)
|
||||
NFS_DPF(RC, ("U%03x", rp->rc_xid & 0xfff));
|
||||
if ((rp->rc_flag & RC_LOCKED) != 0) {
|
||||
rp->rc_flag |= RC_WANTED;
|
||||
(void) tsleep((caddr_t)rp, PZERO-1, "nfsrc", 0);
|
||||
(void) tsleep(rp, PZERO-1, "nfsrc", 0);
|
||||
goto loop;
|
||||
}
|
||||
rp->rc_flag |= RC_LOCKED;
|
||||
@ -310,7 +310,7 @@ nfsrv_updatecache(struct nfsrv_descript *nd, int repvalid, struct mbuf *repmbuf)
|
||||
rp->rc_flag &= ~RC_LOCKED;
|
||||
if (rp->rc_flag & RC_WANTED) {
|
||||
rp->rc_flag &= ~RC_WANTED;
|
||||
wakeup((caddr_t)rp);
|
||||
wakeup(rp);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -705,7 +705,7 @@ nfsrv_wakenfsd(struct nfssvc_sock *slp)
|
||||
panic("nfsd wakeup");
|
||||
slp->ns_sref++;
|
||||
nd->nfsd_slp = slp;
|
||||
wakeup((caddr_t)nd);
|
||||
wakeup(nd);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ nfssvc(struct thread *td, struct nfssvc_args *uap)
|
||||
mtx_lock(&Giant);
|
||||
while (nfssvc_sockhead_flag & SLP_INIT) {
|
||||
nfssvc_sockhead_flag |= SLP_WANTINIT;
|
||||
(void) tsleep((caddr_t)&nfssvc_sockhead, PSOCK, "nfsd init", 0);
|
||||
(void) tsleep(&nfssvc_sockhead, PSOCK, "nfsd init", 0);
|
||||
}
|
||||
if (uap->flag & NFSSVC_ADDSOCK) {
|
||||
error = copyin(uap->argp, (caddr_t)&nfsdarg, sizeof(nfsdarg));
|
||||
@ -316,7 +316,7 @@ nfssvc_nfsd(struct thread *td)
|
||||
(nfsd_head_flag & NFSD_CHECKSLP) == 0) {
|
||||
nfsd->nfsd_flag |= NFSD_WAITING;
|
||||
nfsd_waiting++;
|
||||
error = tsleep((caddr_t)nfsd, PSOCK | PCATCH,
|
||||
error = tsleep(nfsd, PSOCK | PCATCH,
|
||||
"nfsd", 0);
|
||||
nfsd_waiting--;
|
||||
if (error)
|
||||
@ -611,7 +611,7 @@ nfs_slplock(struct nfssvc_sock *slp, int wait)
|
||||
return(0); /* already locked, fail */
|
||||
while (*statep & NFSRV_SNDLOCK) {
|
||||
*statep |= NFSRV_WANTSND;
|
||||
(void) tsleep((caddr_t)statep, PZERO - 1, "nfsslplck", 0);
|
||||
(void) tsleep(statep, PZERO - 1, "nfsslplck", 0);
|
||||
}
|
||||
*statep |= NFSRV_SNDLOCK;
|
||||
return (1);
|
||||
@ -630,7 +630,7 @@ nfs_slpunlock(struct nfssvc_sock *slp)
|
||||
*statep &= ~NFSRV_SNDLOCK;
|
||||
if (*statep & NFSRV_WANTSND) {
|
||||
*statep &= ~NFSRV_WANTSND;
|
||||
wakeup((caddr_t)statep);
|
||||
wakeup(statep);
|
||||
}
|
||||
}
|
||||
|
||||
@ -663,7 +663,7 @@ nfsrv_init(int terminating)
|
||||
nfssvc_sockhead_flag &= ~SLP_INIT;
|
||||
if (nfssvc_sockhead_flag & SLP_WANTINIT) {
|
||||
nfssvc_sockhead_flag &= ~SLP_WANTINIT;
|
||||
wakeup((caddr_t)&nfssvc_sockhead);
|
||||
wakeup(&nfssvc_sockhead);
|
||||
}
|
||||
|
||||
TAILQ_INIT(&nfsd_head);
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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)) {
|
||||
|
@ -692,7 +692,7 @@ meteor_intr(void *arg)
|
||||
* Wake up the user in single capture mode.
|
||||
*/
|
||||
if(mtr->flags & METEOR_SINGLE)
|
||||
wakeup((caddr_t)mtr);
|
||||
wakeup(mtr);
|
||||
/*
|
||||
* If the user requested to be notified via signal,
|
||||
* let them know the frame is complete.
|
||||
@ -1145,12 +1145,12 @@ struct saa7116_regs *m;
|
||||
m = meteor[unit].base;
|
||||
|
||||
m->cap_cntl = 0x0;
|
||||
tsleep((caddr_t)m, METPRI, "Mreset", hz/50);
|
||||
tsleep(m, METPRI, "Mreset", hz/50);
|
||||
|
||||
m->cap_cntl = 0x8ff0;
|
||||
m->cap_cntl = 0x80c0;
|
||||
m->cap_cntl = 0x8040;
|
||||
tsleep((caddr_t)m, METPRI, "Mreset", hz/10);
|
||||
tsleep(m, METPRI, "Mreset", hz/10);
|
||||
m->cap_cntl = 0x80c0;
|
||||
|
||||
return 0;
|
||||
@ -1230,7 +1230,7 @@ meteor_close(dev_t dev, int flags, int fmt, struct thread *td)
|
||||
/* this should not happen, the read capture
|
||||
should have completed or in the very least
|
||||
recieved a signal before close is called. */
|
||||
wakeup((caddr_t)mtr); /* continue read */
|
||||
wakeup(mtr); /* continue read */
|
||||
/*
|
||||
* Turn off capture mode.
|
||||
*/
|
||||
@ -1316,7 +1316,7 @@ meteor_read(dev_t dev, struct uio *uio, int ioflag)
|
||||
/* Start capture */
|
||||
start_capture(mtr, METEOR_SINGLE);
|
||||
|
||||
status=tsleep((caddr_t)mtr, METPRI, "capturing", 0);
|
||||
status=tsleep(mtr, METPRI, "capturing", 0);
|
||||
if (!status) /* successful capture */
|
||||
status = uiomove((caddr_t)mtr->bigbuf, count, uio);
|
||||
else
|
||||
@ -1627,7 +1627,7 @@ meteor_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
||||
start_capture(mtr, METEOR_SINGLE);
|
||||
|
||||
/* wait for capture to complete */
|
||||
error=tsleep((caddr_t)mtr, METPRI, "capturing", 0);
|
||||
error=tsleep(mtr, METPRI, "capturing", 0);
|
||||
if(error)
|
||||
printf("meteor%d: ioctl: tsleep error %d\n",
|
||||
unit, error);
|
||||
|
@ -261,7 +261,7 @@ struct xsocket {
|
||||
(sb)->sb_flags &= ~SB_LOCK; \
|
||||
if ((sb)->sb_flags & SB_WANT) { \
|
||||
(sb)->sb_flags &= ~SB_WANT; \
|
||||
wakeup((caddr_t)&(sb)->sb_flags); \
|
||||
wakeup(&(sb)->sb_flags); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
@ -388,7 +388,7 @@ sema_get(semap, interlock)
|
||||
semap->timo);
|
||||
FREE_LOCK(interlock);
|
||||
} else {
|
||||
tsleep((caddr_t)semap, semap->prio, semap->name,
|
||||
tsleep(semap, semap->prio, semap->name,
|
||||
semap->timo);
|
||||
}
|
||||
return (0);
|
||||
|
@ -139,7 +139,7 @@ chkdq(ip, change, cred, flags)
|
||||
continue;
|
||||
while (dq->dq_flags & DQ_LOCK) {
|
||||
dq->dq_flags |= DQ_WANT;
|
||||
(void) tsleep((caddr_t)dq, PINOD+1, "chkdq1", 0);
|
||||
(void) tsleep(dq, PINOD+1, "chkdq1", 0);
|
||||
}
|
||||
ncurblocks = dq->dq_curblocks + change;
|
||||
if (ncurblocks >= 0)
|
||||
@ -165,7 +165,7 @@ chkdq(ip, change, cred, flags)
|
||||
continue;
|
||||
while (dq->dq_flags & DQ_LOCK) {
|
||||
dq->dq_flags |= DQ_WANT;
|
||||
(void) tsleep((caddr_t)dq, PINOD+1, "chkdq2", 0);
|
||||
(void) tsleep(dq, PINOD+1, "chkdq2", 0);
|
||||
}
|
||||
/* Reset timer when crossing soft limit */
|
||||
if (dq->dq_curblocks + change >= dq->dq_bsoftlimit &&
|
||||
@ -261,7 +261,7 @@ chkiq(ip, change, cred, flags)
|
||||
continue;
|
||||
while (dq->dq_flags & DQ_LOCK) {
|
||||
dq->dq_flags |= DQ_WANT;
|
||||
(void) tsleep((caddr_t)dq, PINOD+1, "chkiq1", 0);
|
||||
(void) tsleep(dq, PINOD+1, "chkiq1", 0);
|
||||
}
|
||||
ncurinodes = dq->dq_curinodes + change;
|
||||
/* XXX: ncurinodes is unsigned */
|
||||
@ -288,7 +288,7 @@ chkiq(ip, change, cred, flags)
|
||||
continue;
|
||||
while (dq->dq_flags & DQ_LOCK) {
|
||||
dq->dq_flags |= DQ_WANT;
|
||||
(void) tsleep((caddr_t)dq, PINOD+1, "chkiq2", 0);
|
||||
(void) tsleep(dq, PINOD+1, "chkiq2", 0);
|
||||
}
|
||||
/* Reset timer when crossing soft limit */
|
||||
if (dq->dq_curinodes + change >= dq->dq_isoftlimit &&
|
||||
@ -586,7 +586,7 @@ setquota(mp, id, type, addr)
|
||||
dq = ndq;
|
||||
while (dq->dq_flags & DQ_LOCK) {
|
||||
dq->dq_flags |= DQ_WANT;
|
||||
(void) tsleep((caddr_t)dq, PINOD+1, "setqta", 0);
|
||||
(void) tsleep(dq, PINOD+1, "setqta", 0);
|
||||
}
|
||||
/*
|
||||
* Copy all but the current values.
|
||||
@ -647,7 +647,7 @@ setuse(mp, id, type, addr)
|
||||
dq = ndq;
|
||||
while (dq->dq_flags & DQ_LOCK) {
|
||||
dq->dq_flags |= DQ_WANT;
|
||||
(void) tsleep((caddr_t)dq, PINOD+1, "setuse", 0);
|
||||
(void) tsleep(dq, PINOD+1, "setuse", 0);
|
||||
}
|
||||
/*
|
||||
* Reset time limit if have a soft limit and were
|
||||
@ -862,7 +862,7 @@ dqget(vp, id, ump, type, dqp)
|
||||
if (vp != dqvp)
|
||||
VOP_UNLOCK(dqvp, 0, td);
|
||||
if (dq->dq_flags & DQ_WANT)
|
||||
wakeup((caddr_t)dq);
|
||||
wakeup(dq);
|
||||
dq->dq_flags = 0;
|
||||
/*
|
||||
* I/O error in reading quota file, release
|
||||
@ -951,7 +951,7 @@ dqsync(vp, dq)
|
||||
vn_lock(dqvp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
while (dq->dq_flags & DQ_LOCK) {
|
||||
dq->dq_flags |= DQ_WANT;
|
||||
(void) tsleep((caddr_t)dq, PINOD+2, "dqsync", 0);
|
||||
(void) tsleep(dq, PINOD+2, "dqsync", 0);
|
||||
if ((dq->dq_flags & DQ_MOD) == 0) {
|
||||
if (vp != dqvp)
|
||||
VOP_UNLOCK(dqvp, 0, td);
|
||||
@ -972,7 +972,7 @@ dqsync(vp, dq)
|
||||
if (auio.uio_resid && error == 0)
|
||||
error = EIO;
|
||||
if (dq->dq_flags & DQ_WANT)
|
||||
wakeup((caddr_t)dq);
|
||||
wakeup(dq);
|
||||
dq->dq_flags &= ~(DQ_MOD|DQ_LOCK|DQ_WANT);
|
||||
if (vp != dqvp)
|
||||
VOP_UNLOCK(dqvp, 0, td);
|
||||
|
Loading…
Reference in New Issue
Block a user