Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 14 years ago
parent
commit
d0aafa4526
  1. 2
      Changes
  2. 24
      ev_poll.c

2
Changes

@ -2,6 +2,8 @@ Revision history for libev, a high-performance and full-featured event loop.
- event_base_loopexit should return 0 on success
(W.C.A. Wijngaards).
- work around poll() potentially not clearing revents
field in ev_poll (Brandon Black).
- added linux eventfd support.
- try to autodetect epoll and inotify support
by libc header version if not using autoconf.

24
ev_poll.c

@ -97,20 +97,18 @@ poll_poll (EV_P_ ev_tstamp timeout)
fd_enomem (EV_A);
else if (errno != EINTR)
syserr ("(libev) poll");
return;
}
for (i = 0; i < pollcnt; ++i)
if (expect_false (polls [i].revents & POLLNVAL))
fd_kill (EV_A_ polls [i].fd);
else
fd_event (
EV_A_
polls [i].fd,
(polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0)
| (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
);
else if (res > 0)
for (i = 0; i < pollcnt; ++i)
if (expect_false (polls [i].revents & POLLNVAL))
fd_kill (EV_A_ polls [i].fd);
else
fd_event (
EV_A_
polls [i].fd,
(polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0)
| (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
);
}
int inline_size

Loading…
Cancel
Save