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

Comparing libev/ev.c (file contents):
Revision 1.184 by root, Wed Dec 12 05:30:52 2007 UTC vs.
Revision 1.186 by root, Sat Dec 15 23:14:38 2007 UTC

202#ifndef CLOCK_REALTIME 202#ifndef CLOCK_REALTIME
203# undef EV_USE_REALTIME 203# undef EV_USE_REALTIME
204# define EV_USE_REALTIME 0 204# define EV_USE_REALTIME 0
205#endif 205#endif
206 206
207#if !EV_STAT_ENABLE
208# undef EV_USE_INOTIFY
209# define EV_USE_INOTIFY 0
210#endif
211
212#if EV_USE_INOTIFY
213# include <sys/inotify.h>
214#endif
215
207#if EV_SELECT_IS_WINSOCKET 216#if EV_SELECT_IS_WINSOCKET
208# include <winsock.h> 217# include <winsock.h>
209#endif
210
211#if !EV_STAT_ENABLE
212# define EV_USE_INOTIFY 0
213#endif
214
215#if EV_USE_INOTIFY
216# include <sys/inotify.h>
217#endif 218#endif
218 219
219/**/ 220/**/
220 221
221/* 222/*
230 231
231#define MIN_TIMEJUMP 1. /* minimum timejump that gets detected (if monotonic clock available) */ 232#define MIN_TIMEJUMP 1. /* minimum timejump that gets detected (if monotonic clock available) */
232#define MAX_BLOCKTIME 59.743 /* never wait longer than this time (to detect time jumps) */ 233#define MAX_BLOCKTIME 59.743 /* never wait longer than this time (to detect time jumps) */
233/*#define CLEANUP_INTERVAL (MAX_BLOCKTIME * 5.) /* how often to try to free memory and re-check fds, TODO */ 234/*#define CLEANUP_INTERVAL (MAX_BLOCKTIME * 5.) /* how often to try to free memory and re-check fds, TODO */
234 235
235#if __GNUC__ >= 3 236#if __GNUC__ >= 4
236# define expect(expr,value) __builtin_expect ((expr),(value)) 237# define expect(expr,value) __builtin_expect ((expr),(value))
237# define noinline __attribute__ ((noinline)) 238# define noinline __attribute__ ((noinline))
238#else 239#else
239# define expect(expr,value) (expr) 240# define expect(expr,value) (expr)
240# define noinline 241# define noinline
1037#if EV_IDLE_ENABLE 1038#if EV_IDLE_ENABLE
1038 array_free (idle, [i]); 1039 array_free (idle, [i]);
1039#endif 1040#endif
1040 } 1041 }
1041 1042
1043 ev_free (anfds); anfdmax = 0;
1044
1042 /* have to use the microsoft-never-gets-it-right macro */ 1045 /* have to use the microsoft-never-gets-it-right macro */
1043 array_free (fdchange, EMPTY); 1046 array_free (fdchange, EMPTY);
1044 array_free (timer, EMPTY); 1047 array_free (timer, EMPTY);
1045#if EV_PERIODIC_ENABLE 1048#if EV_PERIODIC_ENABLE
1046 array_free (periodic, EMPTY); 1049 array_free (periodic, EMPTY);
1047#endif 1050#endif
1048 array_free (prepare, EMPTY); 1051 array_free (prepare, EMPTY);
1049 array_free (check, EMPTY); 1052 array_free (check, EMPTY);
1053 array_free (fork, EMPTY);
1050 1054
1051 backend = 0; 1055 backend = 0;
1052} 1056}
1053 1057
1054void inline_size infy_fork (EV_P); 1058void inline_size infy_fork (EV_P);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines