… | |
… | |
95 | fd_ebadf (EV_A); |
95 | fd_ebadf (EV_A); |
96 | else if (errno == ENOMEM && !syserr_cb) |
96 | else if (errno == ENOMEM && !syserr_cb) |
97 | fd_enomem (EV_A); |
97 | fd_enomem (EV_A); |
98 | else if (errno != EINTR) |
98 | else if (errno != EINTR) |
99 | syserr ("(libev) poll"); |
99 | syserr ("(libev) poll"); |
100 | |
|
|
101 | return; |
|
|
102 | } |
100 | } |
103 | |
101 | else if (res > 0) |
104 | for (i = 0; i < pollcnt; ++i) |
102 | for (i = 0; i < pollcnt; ++i) |
105 | if (expect_false (polls [i].revents & POLLNVAL)) |
103 | if (expect_false (polls [i].revents & POLLNVAL)) |
106 | fd_kill (EV_A_ polls [i].fd); |
104 | fd_kill (EV_A_ polls [i].fd); |
107 | else |
105 | else |
108 | fd_event ( |
106 | fd_event ( |
109 | EV_A_ |
107 | EV_A_ |
110 | polls [i].fd, |
108 | polls [i].fd, |
111 | (polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) |
109 | (polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) |
112 | | (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) |
110 | | (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) |
113 | ); |
111 | ); |
114 | } |
112 | } |
115 | |
113 | |
116 | int inline_size |
114 | int inline_size |
117 | poll_init (EV_P_ int flags) |
115 | poll_init (EV_P_ int flags) |
118 | { |
116 | { |