Lines Matching defs:epfd
1244 SOCKET epfd; /* epoll control file descriptor */
1258 if (self->epfd >= 0) {
1259 int epfd = self->epfd;
1260 self->epfd = -1;
1262 if (close(epfd) < 0)
1283 self->epfd = epoll_create1(EPOLL_CLOEXEC);
1285 self->epfd = epoll_create(sizehint);
1290 self->epfd = fd;
1292 if (self->epfd < 0) {
1299 if (fd == -1 && _Py_set_inheritable(self->epfd, 0, NULL) < 0) {
1382 if (self->epfd < 0)
1398 if (self->epfd < 0)
1400 return PyLong_FromLong(self->epfd);
1424 pyepoll_internal_ctl(int epfd, int op, int fd, unsigned int events)
1429 if (epfd < 0)
1438 result = epoll_ctl(epfd, op, fd, &ev);
1446 result = epoll_ctl(epfd, op, fd, &ev);
1479 return pyepoll_internal_ctl(self->epfd, EPOLL_CTL_ADD, fd, eventmask);
1498 return pyepoll_internal_ctl(self->epfd, EPOLL_CTL_MOD, fd, eventmask);
1514 return pyepoll_internal_ctl(self->epfd, EPOLL_CTL_DEL, fd, 0);
1542 if (self->epfd < 0)
1597 nfds = epoll_wait(self->epfd, evs, maxevents, (int)ms);
1652 if (self->epfd < 0)