Lines Matching defs:pl

838 pollout(struct pollfd *pl, struct pollfd *upl, u_int nfds)
844 error = copyout(&pl->revents, &upl->revents,
846 pl++;
923 struct pollfd pfds[4], *pl = pfds;
933 pl = mallocarray(nfds, sizeof(*pl), M_TEMP,
935 if (pl == NULL)
941 sz = nfds * sizeof(*pl);
943 if ((error = copyin(fds, pl, sz)) != 0)
950 ppollregister(p, pl, nfds, &nevents, &ncollected);
990 ncollected += ppollcollect(p, &kev[i], pl, nfds);
1010 error = pollout(pl, fds, nfds);
1016 error = pollout(pl, fds, nfds);
1021 ktrpollfd(p, pl, nfds);
1024 if (pl != pfds)
1025 free(pl, M_TEMP, sz);
1034 struct pollfd *pl, unsigned int pollid)
1038 KASSERT(pl->revents == 0);
1051 pl->revents |= POLLNVAL;
1068 pl->fd, pl->revents, p->p_kq_serial, kevp->filter,
1072 pl->revents |= POLLERR;
1087 ppollregister(struct proc *p, struct pollfd *pl, int nfds, int *nregistered,
1094 pl[i].events &= ~POLL_NOHUP;
1095 pl[i].revents = 0;
1097 if (pl[i].fd < 0)
1105 forcehup = ((pl[i].events & ~POLLHUP) == 0);
1108 i+1, nfds, pl[i].fd, pl[i].events, p->p_kq_serial);
1113 if (pl[i].events & (POLLIN | POLLRDNORM)) {
1114 EV_SET(kevp, pl[i].fd, EVFILT_READ,
1120 if (pl[i].events & (POLLOUT | POLLWRNORM)) {
1121 EV_SET(kevp, pl[i].fd, EVFILT_WRITE,
1127 if ((pl[i].events & (POLLPRI | POLLRDBAND)) || forcehup) {
1130 EV_SET(kevp, pl[i].fd, EVFILT_EXCEPT,
1140 *nregistered += ppollregister_evts(p, kev, nkev, &pl[i], i);
1142 if (pl[i].revents != 0)
1154 ppollcollect(struct proc *p, struct kevent *kevp, struct pollfd *pl, u_int nfds)
1169 if ((int)kevp->ident != pl[i].fd) {
1171 __func__, kevp, i + 1, nfds, (int)kevp->ident, pl[i].fd,
1182 already_seen = (pl[i].revents != 0);
1186 pl[i].revents = POLLNVAL;
1188 } else if (pl[i].revents & POLLNVAL) {
1195 pl[i].revents |= POLLHUP;
1196 if (pl[i].events & (POLLIN | POLLRDNORM))
1197 pl[i].revents |= pl[i].events & (POLLIN | POLLRDNORM);
1202 pl[i].revents |= POLLHUP;
1203 } else if (pl[i].events & (POLLOUT | POLLWRNORM)) {
1204 pl[i].revents |= pl[i].events & (POLLOUT | POLLWRNORM);
1209 if (pl[i].events != 0 && pl[i].events != POLLOUT)
1210 DPRINTFN(0, "weird events %x\n", pl[i].events);
1211 pl[i].revents |= POLLHUP;
1214 if (pl[i].events & (POLLPRI | POLLRDBAND))
1215 pl[i].revents |= pl[i].events & (POLLPRI | POLLRDBAND);
1223 i+1, nfds, pl[i].fd, pl[i].revents, (unsigned long)kevp->udata,
1234 if (pl[i].revents == 0 && ratecheck(&poll_lasterr, &poll_errintvl)) {
1237 p->p_p->ps_comm, p->p_tid, i, pl[i].fd,
1238 pl[i].events, kevp->filter, kevp->flags);
1241 if (!already_seen && (pl[i].revents != 0))