… | |
… | |
201 | struct ev_check |
201 | struct ev_check |
202 | { |
202 | { |
203 | EV_WATCHER (ev_check) |
203 | EV_WATCHER (ev_check) |
204 | }; |
204 | }; |
205 | |
205 | |
206 | /* invoked when sigchld is received and waitpid indicates the givne pid */ |
206 | /* invoked when sigchld is received and waitpid indicates the given pid */ |
207 | /* revent EV_CHILD */ |
207 | /* revent EV_CHILD */ |
208 | /* does not support priorities */ |
208 | /* does not support priorities */ |
209 | struct ev_child |
209 | struct ev_child |
210 | { |
210 | { |
211 | EV_WATCHER_LIST (ev_child) |
211 | EV_WATCHER_LIST (ev_child) |
… | |
… | |
231 | struct ev_child child; |
231 | struct ev_child child; |
232 | }; |
232 | }; |
233 | |
233 | |
234 | /* bits for ev_default_loop and ev_loop_new */ |
234 | /* bits for ev_default_loop and ev_loop_new */ |
235 | /* the default */ |
235 | /* the default */ |
236 | #define EVMETHOD_AUTO 0x00000000 /* not quite a mask */ |
236 | #define EVFLAG_AUTO 0x00000000 /* not quite a mask */ |
237 | |
237 | |
238 | /* method bits to be ored together */ |
238 | /* method bits to be ored together */ |
239 | #define EVMETHOD_SELECT 0x00000001 /* about anywhere */ |
239 | #define EVMETHOD_SELECT 0x00000001 /* about anywhere */ |
240 | #define EVMETHOD_POLL 0x00000002 /* !win */ |
240 | #define EVMETHOD_POLL 0x00000002 /* !win */ |
241 | #define EVMETHOD_EPOLL 0x00000004 /* linux */ |
241 | #define EVMETHOD_EPOLL 0x00000004 /* linux */ |
242 | #define EVMETHOD_KQUEUE 0x00000008 /* bsd */ |
242 | #define EVMETHOD_KQUEUE 0x00000008 /* bsd */ |
243 | #define EVMETHOD_DEVPOLL 0x00000010 /* solaris 8 */ /* NYI */ |
243 | #define EVMETHOD_DEVPOLL 0x00000010 /* solaris 8 */ /* NYI */ |
244 | #define EVMETHOD_PORT 0x00000020 /* solaris 10 */ /* NYI */ |
244 | #define EVMETHOD_PORT 0x00000020 /* solaris 10 */ /* NYI */ |
245 | |
245 | |
246 | /* flag bits */ |
246 | /* flag bits */ |
247 | #define EVMETHOD_NOENV 0x01000000 /* do NOT consult environment */ |
247 | #define EVFLAG_NOENV 0x01000000 /* do NOT consult environment */ |
248 | |
248 | |
249 | #if EV_PROTOTYPES |
249 | #if EV_PROTOTYPES |
250 | int ev_version_major (void); |
250 | int ev_version_major (void); |
251 | int ev_version_minor (void); |
251 | int ev_version_minor (void); |
252 | |
252 | |
… | |
… | |
296 | /* if you create alternative loops you have to call ev_loop_fork on them */ |
296 | /* if you create alternative loops you have to call ev_loop_fork on them */ |
297 | /* you can call it in either the parent or the child */ |
297 | /* you can call it in either the parent or the child */ |
298 | /* you can actually call it at any time, anywhere :) */ |
298 | /* you can actually call it at any time, anywhere :) */ |
299 | void ev_default_fork (void); |
299 | void ev_default_fork (void); |
300 | |
300 | |
301 | int ev_method (EV_P); |
301 | unsigned int ev_method (EV_P); |
302 | #endif |
302 | #endif |
303 | |
303 | |
304 | #define EVLOOP_NONBLOCK 1 /* do not block/wait */ |
304 | #define EVLOOP_NONBLOCK 1 /* do not block/wait */ |
305 | #define EVLOOP_ONESHOT 2 /* block *once* only */ |
305 | #define EVLOOP_ONESHOT 2 /* block *once* only */ |
306 | #define EVUNLOOP_ONCE 1 /* unloop once */ |
306 | #define EVUNLOOP_ONE 1 /* unloop once */ |
307 | #define EVUNLOOP_ALL 2 /* unloop all loops */ |
307 | #define EVUNLOOP_ALL 2 /* unloop all loops */ |
308 | |
308 | |
309 | #if EV_PROTOTYPES |
309 | #if EV_PROTOTYPES |
310 | void ev_loop (EV_P_ int flags); |
310 | void ev_loop (EV_P_ int flags); |
311 | void ev_unloop (EV_P_ int how); /* set to 1 to break out of event loop, set to 2 to break out of all event loops */ |
311 | void ev_unloop (EV_P_ int how); /* set to 1 to break out of event loop, set to 2 to break out of all event loops */ |