Use the passed in thread to selrecord() instead of curthread.

This commit is contained in:
John Baldwin 2001-09-21 22:46:54 +00:00
parent bce94723a4
commit ed01445d8f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83805
10 changed files with 12 additions and 12 deletions

View File

@ -224,7 +224,7 @@ random_poll(dev_t dev, int events, struct thread *td)
if (random_systat.seeded)
revents = events & (POLLIN | POLLRDNORM);
else
selrecord(curthread, &random_systat.rsel);
selrecord(td, &random_systat.rsel);
}
return revents;
}

View File

@ -530,7 +530,7 @@ chn_poll(struct pcm_channel *c, int ev, struct thread *td)
if (chn_polltrigger(c) && chn_pollreset(c))
ret = ev;
else
selrecord(curthread, sndbuf_getsel(bs));
selrecord(td, sndbuf_getsel(bs));
return ret;
}

View File

@ -562,7 +562,7 @@ usbpoll(dev, events, td)
revents |= events & mask;
if (revents == 0 && (events & mask)) {
DPRINTFN(2,("usb: sleeping on %p\n", &usb_selevent));
selrecord(curthread, &usb_selevent);
selrecord(td, &usb_selevent);
}
splx(s);

View File

@ -745,7 +745,7 @@ kqueue_poll(struct file *fp, int events, struct ucred *cred, struct thread *td)
if (kq->kq_count) {
revents |= events & (POLLIN | POLLRDNORM);
} else {
selrecord(curthread, &kq->kq_sel);
selrecord(td, &kq->kq_sel);
kq->kq_state |= KQ_SEL;
}
}

View File

@ -178,7 +178,7 @@ logpoll(dev_t dev, int events, struct thread *td)
if (msgbufp->msg_bufr != msgbufp->msg_bufx)
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(curthread, &logsoftc.sc_selp);
selrecord(td, &logsoftc.sc_selp);
}
splx(s);
return (revents);

View File

@ -1108,12 +1108,12 @@ pipe_poll(fp, events, cred, td)
if (revents == 0) {
if (events & (POLLIN | POLLRDNORM)) {
selrecord(curthread, &rpipe->pipe_sel);
selrecord(td, &rpipe->pipe_sel);
rpipe->pipe_state |= PIPE_SEL;
}
if (events & (POLLOUT | POLLWRNORM)) {
selrecord(curthread, &wpipe->pipe_sel);
selrecord(td, &wpipe->pipe_sel);
wpipe->pipe_state |= PIPE_SEL;
}
}

View File

@ -1527,12 +1527,12 @@ sopoll(struct socket *so, int events, struct ucred *cred, struct thread *td)
if (revents == 0) {
if (events & (POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND)) {
selrecord(curthread, &so->so_rcv.sb_sel);
selrecord(td, &so->so_rcv.sb_sel);
so->so_rcv.sb_flags |= SB_SEL;
}
if (events & (POLLOUT | POLLWRNORM)) {
selrecord(curthread, &so->so_snd.sb_sel);
selrecord(td, &so->so_snd.sb_sel);
so->so_snd.sb_flags |= SB_SEL;
}
}

View File

@ -990,7 +990,7 @@ bpfpoll(dev, events, td)
if (d->bd_hlen != 0 || (d->bd_immediate && d->bd_slen != 0))
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(curthread, &d->bd_sel);
selrecord(td, &d->bd_sel);
}
BPFD_UNLOCK(d);
return (revents);

View File

@ -935,7 +935,7 @@ tappoll(dev, events, td)
TAPDEBUG("%s%d waiting for data, minor = %#x\n",
ifp->if_name, ifp->if_unit, minor(dev));
selrecord(curthread, &tp->tap_rsel);
selrecord(td, &tp->tap_rsel);
}
}

View File

@ -809,7 +809,7 @@ tunpoll(dev_t dev, int events, struct thread *td)
} else {
TUNDEBUG("%s%d: tunpoll waiting\n", ifp->if_name,
ifp->if_unit);
selrecord(curthread, &tp->tun_rsel);
selrecord(td, &tp->tun_rsel);
}
}
if (events & (POLLOUT | POLLWRNORM))