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.15 by root, Sun Nov 4 15:58:50 2007 UTC vs.
Revision 1.18 by root, Sun Nov 4 22:03:17 2007 UTC

40 ev.data.u64 = fd; /* use u64 to fully initialise the struct, for nicer strace etc. */ 40 ev.data.u64 = fd; /* use u64 to fully initialise the struct, for nicer strace etc. */
41 ev.events = 41 ev.events =
42 (nev & EV_READ ? EPOLLIN : 0) 42 (nev & EV_READ ? EPOLLIN : 0)
43 | (nev & EV_WRITE ? EPOLLOUT : 0); 43 | (nev & EV_WRITE ? EPOLLOUT : 0);
44 44
45 epoll_ctl (epoll_fd, mode, fd, &ev); 45 if (epoll_ctl (epoll_fd, mode, fd, &ev))
46 fd_kill (EV_A_ fd);
46} 47}
47 48
48static void 49static void
49epoll_poll (EV_P_ ev_tstamp timeout) 50epoll_poll (EV_P_ ev_tstamp timeout)
50{ 51{
100} 101}
101 102
102static void 103static void
103epoll_fork (EV_P) 104epoll_fork (EV_P)
104{ 105{
105 int fd;
106
107 epoll_fd = epoll_create (256); 106 epoll_fd = epoll_create (256);
108 fcntl (epoll_fd, F_SETFD, FD_CLOEXEC); 107 fcntl (epoll_fd, F_SETFD, FD_CLOEXEC);
109 108
110 fd_rearm_all (); 109 fd_rearm_all (EV_A);
111} 110}
112 111

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines