Port forward changes

pull/5647/head
Craig Tiller 9 years ago
parent 34edebc1f5
commit 2fad50d214
  1. 2
      src/core/iomgr/ev_poll_and_epoll_posix.c
  2. 7
      src/core/iomgr/ev_poll_posix.c

@ -1336,7 +1336,7 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock(
for (i = 2; i < pfd_count; i++) {
grpc_fd *fd = watchers[i].fd;
pfds[i].events = (short)grpc_fd_begin_poll(fd, pollset, worker, POLLIN,
pfds[i].events = (short)fd_begin_poll(fd, pollset, worker, POLLIN,
POLLOUT, &watchers[i]);
GRPC_FD_UNREF(fd, "multipoller_start");
}

@ -877,6 +877,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
} else {
pollset->fds[fd_count++] = pollset->fds[i];
watchers[pfd_count].fd = pollset->fds[i];
GRPC_FD_REF(watchers[pfd_count].fd, "multipoller_start");
pfds[pfd_count].fd = pollset->fds[i]->fd;
pfds[pfd_count].revents = 0;
pfd_count++;
@ -890,8 +891,10 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
gpr_mu_unlock(&pollset->mu);
for (i = 2; i < pfd_count; i++) {
pfds[i].events = (short)fd_begin_poll(watchers[i].fd, pollset, &worker,
POLLIN, POLLOUT, &watchers[i]);
grpc_fd *fd = watchers[i].fd;
pfds[i].events = (short)fd_begin_poll(fd, pollset, &worker, POLLIN,
POLLOUT, &watchers[i]);
GRPC_FD_UNREF(fd, "multipoller_start");
}
/* TODO(vpai): Consider first doing a 0 timeout poll here to avoid

Loading…
Cancel
Save