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

Comparing libev/ev.c (file contents):
Revision 1.18 by root, Wed Oct 31 16:29:52 2007 UTC vs.
Revision 1.19 by root, Wed Oct 31 17:55:55 2007 UTC

39#include <assert.h> 39#include <assert.h>
40#include <errno.h> 40#include <errno.h>
41#include <sys/time.h> 41#include <sys/time.h>
42#include <time.h> 42#include <time.h>
43 43
44#define HAVE_EPOLL 1
45
46#ifndef HAVE_MONOTONIC 44#ifndef HAVE_MONOTONIC
47# ifdef CLOCK_MONOTONIC 45# ifdef CLOCK_MONOTONIC
48# define HAVE_MONOTONIC 1 46# define HAVE_MONOTONIC 1
49# endif 47# endif
50#endif 48#endif
188 186
189 for (i = 0; i < eventcnt; ++i) 187 for (i = 0; i < eventcnt; ++i)
190 event (events [i], type); 188 event (events [i], type);
191} 189}
192 190
191/* called on EBADF to verify fds */
192static void
193fd_recheck ()
194{
195 int fd;
196
197 for (fd = 0; fd < anfdmax; ++fd)
198 if (anfds [fd].wev)
199 if (fcntl (fd, F_GETFD) == -1 && errno == EBADF)
200 while (anfds [fd].head)
201 evio_stop (anfds [fd].head);
202}
203
193/*****************************************************************************/ 204/*****************************************************************************/
194 205
195static struct ev_timer **timers; 206static struct ev_timer **timers;
196static int timermax, timercnt; 207static int timermax, timercnt;
197 208

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines