rktio: fix use of POLL...
where EPOLL...
is intended
This commit is contained in:
parent
ad3baffc8d
commit
351c45c78b
|
@ -499,7 +499,7 @@ int rktio_ltps_poll(rktio_t *rktio, rktio_ltps_t *lt)
|
||||||
key = ev.data.fd;
|
key = ev.data.fd;
|
||||||
v = ltps_hash_get(lt, key);
|
v = ltps_hash_get(lt, key);
|
||||||
if (v) {
|
if (v) {
|
||||||
if (ev.events & (POLLIN | POLLHUP | POLLERR)) {
|
if (ev.events & (EPOLLIN | EPOLLHUP | EPOLLERR)) {
|
||||||
s = v->read_handle;
|
s = v->read_handle;
|
||||||
if (s) {
|
if (s) {
|
||||||
ltps_signal_handle(lt, s);
|
ltps_signal_handle(lt, s);
|
||||||
|
@ -507,7 +507,7 @@ int rktio_ltps_poll(rktio_t *rktio, rktio_ltps_t *lt)
|
||||||
v->read_handle = NULL;
|
v->read_handle = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ev.events & (POLLOUT | POLLHUP | POLLERR)) {
|
if (ev.events & (EPOLLOUT | EPOLLHUP | EPOLLERR)) {
|
||||||
s = v->write_handle;
|
s = v->write_handle;
|
||||||
if (s) {
|
if (s) {
|
||||||
ltps_signal_handle(lt, s);
|
ltps_signal_handle(lt, s);
|
||||||
|
@ -521,8 +521,8 @@ int rktio_ltps_poll(rktio_t *rktio, rktio_ltps_t *lt)
|
||||||
kr = epoll_ctl(lt->fd, EPOLL_CTL_DEL, ev.data.fd, NULL);
|
kr = epoll_ctl(lt->fd, EPOLL_CTL_DEL, ev.data.fd, NULL);
|
||||||
log_kqueue_error("remove*", kr);
|
log_kqueue_error("remove*", kr);
|
||||||
} else {
|
} else {
|
||||||
ev.events = ((!v->read_handle ? 0 : POLLIN)
|
ev.events = ((!v->read_handle ? 0 : EPOLLIN)
|
||||||
| (!v->write_handle ? 0 : POLLOUT));
|
| (!v->write_handle ? 0 : EPOLLOUT));
|
||||||
kr = epoll_ctl(lt->fd, EPOLL_CTL_MOD, ev.data.fd, &ev);
|
kr = epoll_ctl(lt->fd, EPOLL_CTL_MOD, ev.data.fd, &ev);
|
||||||
log_kqueue_error("update", kr);
|
log_kqueue_error("update", kr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user