ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev_epoll.c
(Generate patch)

Comparing libev/ev_epoll.c (file contents):
Revision 1.42 by root, Wed Oct 29 10:24:23 2008 UTC vs.
Revision 1.46 by root, Fri Jul 10 19:10:19 2009 UTC

68 /* 68 /*
69 * we handle EPOLL_CTL_DEL by ignoring it here 69 * we handle EPOLL_CTL_DEL by ignoring it here
70 * on the assumption that the fd is gone anyways 70 * on the assumption that the fd is gone anyways
71 * if that is wrong, we have to handle the spurious 71 * if that is wrong, we have to handle the spurious
72 * event in epoll_poll. 72 * event in epoll_poll.
73 * the fd is later added, we try to ADD it, and, if that 73 * if the fd is added again, we try to ADD it, and, if that
74 * fails, we assume it still has the same eventmask. 74 * fails, we assume it still has the same eventmask.
75 */ 75 */
76 if (!nev) 76 if (!nev)
77 return; 77 return;
78 78
117 117
118static void 118static void
119epoll_poll (EV_P_ ev_tstamp timeout) 119epoll_poll (EV_P_ ev_tstamp timeout)
120{ 120{
121 int i; 121 int i;
122 int eventcnt;
123
124 EV_RELEASE_CB;
122 int eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, (int)ceil (timeout * 1000.)); 125 eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, (int)ceil (timeout * 1000.));
126 EV_ACQUIRE_CB;
123 127
124 if (expect_false (eventcnt < 0)) 128 if (expect_false (eventcnt < 0))
125 { 129 {
126 if (errno != EINTR) 130 if (errno != EINTR)
127 ev_syserr ("(libev) epoll_wait"); 131 ev_syserr ("(libev) epoll_wait");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines