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.65 by root, Tue Nov 1 00:17:15 2011 UTC vs.
Revision 1.67 by root, Wed Jun 20 12:39:53 2012 UTC

236epoll_init (EV_P_ int flags) 236epoll_init (EV_P_ int flags)
237{ 237{
238#ifdef EPOLL_CLOEXEC 238#ifdef EPOLL_CLOEXEC
239 backend_fd = epoll_create1 (EPOLL_CLOEXEC); 239 backend_fd = epoll_create1 (EPOLL_CLOEXEC);
240 240
241 if (backend_fd < 0) 241 if (backend_fd < 0 && (errno == EINVAL || errno == ENOSYS))
242#endif 242#endif
243 backend_fd = epoll_create (256); 243 backend_fd = epoll_create (256);
244 244
245 if (backend_fd < 0) 245 if (backend_fd < 0)
246 return 0; 246 return 0;
247 247
248 fcntl (backend_fd, F_SETFD, FD_CLOEXEC); 248 fcntl (backend_fd, F_SETFD, FD_CLOEXEC);
249 249
250 backend_mintime = 1./1024.; /* epoll does sometimes return early, this is just to avoid the worst */ 250 backend_mintime = 1e-3; /* epoll does sometimes return early, this is just to avoid the worst */
251 backend_modify = epoll_modify; 251 backend_modify = epoll_modify;
252 backend_poll = epoll_poll; 252 backend_poll = epoll_poll;
253 253
254 epoll_eventmax = 64; /* initial number of events receivable per poll */ 254 epoll_eventmax = 64; /* initial number of events receivable per poll */
255 epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax); 255 epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines