Lines Matching refs:fd
71 epoll_modify (EV_P_ int fd, int oev, int nev) in epoll_modify() argument
87 oldmask = anfds [fd].emask; in epoll_modify()
88 anfds [fd].emask = nev; in epoll_modify()
91 ev.data.u64 = (uint64_t)(uint32_t)fd in epoll_modify()
92 | ((uint64_t)(uint32_t)++anfds [fd].egen << 32); in epoll_modify()
96 …ect_true (!epoll_ctl (backend_fd, oev && oldmask != nev ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &ev))) in epoll_modify()
105 if (!epoll_ctl (backend_fd, EPOLL_CTL_ADD, fd, &ev)) in epoll_modify()
115 if (!epoll_ctl (backend_fd, EPOLL_CTL_MOD, fd, &ev)) in epoll_modify()
122 anfds [fd].emask = EV_EMASK_EPERM; in epoll_modify()
128 epoll_eperms [epoll_epermcnt++] = fd; in epoll_modify()
134 fd_kill (EV_A_ fd); in epoll_modify()
138 --anfds [fd].egen; in epoll_modify()
168 int fd = (uint32_t)ev->data.u64; /* mask out the lower 32 bits */ in epoll_poll() local
169 int want = anfds [fd].events; in epoll_poll()
179 if (expect_false ((uint32_t)anfds [fd].egen != (uint32_t)(ev->data.u64 >> 32))) in epoll_poll()
188 anfds [fd].emask = want; in epoll_poll()
204 if (epoll_ctl (backend_fd, want ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, ev)) in epoll_poll()
211 fd_event (EV_A_ fd, got); in epoll_poll()
225 int fd = epoll_eperms [i]; in epoll_poll() local
226 unsigned char events = anfds [fd].events & (EV_READ | EV_WRITE); in epoll_poll()
228 if (anfds [fd].emask & EV_EMASK_EPERM && events) in epoll_poll()
229 fd_event (EV_A_ fd, events); in epoll_poll()
233 anfds [fd].emask = 0; in epoll_poll()