… | |
… | |
210 | |
210 | |
211 | #if EV_PROTOTYPES |
211 | #if EV_PROTOTYPES |
212 | int ev_version_major (void); |
212 | int ev_version_major (void); |
213 | int ev_version_minor (void); |
213 | int ev_version_minor (void); |
214 | |
214 | |
215 | /* these three calls are suitable for plugging into pthread_atfork */ |
|
|
216 | void ev_fork_prepare (void); |
|
|
217 | void ev_fork_parent (void); |
|
|
218 | void ev_fork_child (void); |
|
|
219 | |
|
|
220 | ev_tstamp ev_time (void); |
215 | ev_tstamp ev_time (void); |
221 | |
216 | |
222 | # if EV_MULTIPLICITY |
217 | # if EV_MULTIPLICITY |
|
|
218 | /* the default loop is the only one that handles signals and child watchers */ |
|
|
219 | /* you can call this as often as you like */ |
|
|
220 | struct ev_loop *ev_default_loop (int methods); /* returns default loop */ |
|
|
221 | |
|
|
222 | /* create and destroy alternative loops that don't handle signals */ |
223 | struct ev_loop *ev_loop_new (int methods); |
223 | struct ev_loop *ev_loop_new (int methods); |
224 | void ev_loop_delete (EV_P); |
224 | void ev_loop_destroy (EV_P); |
|
|
225 | void ev_loop_fork (EV_P); |
225 | # else |
226 | # else |
226 | int ev_init (int methods); /* returns ev_method */ |
227 | int ev_default_loop (int methods); /* returns true when successful */ |
227 | # endif |
228 | # endif |
228 | |
229 | |
|
|
230 | void ev_default_destroy (void); /* destroy the default loop */ |
|
|
231 | /* this needs to be called after fork, to duplicate the default loop */ |
|
|
232 | /* if you create alternative loops you have to call ev_loop_fork on them */ |
|
|
233 | /* you can call it in either the parent or the child */ |
|
|
234 | /* you can actually call it at any time, anywhere :) */ |
|
|
235 | void ev_default_fork (void); |
|
|
236 | |
229 | int ev_method (EV_P); |
237 | int ev_method (EV_P); |
230 | |
|
|
231 | #endif |
238 | #endif |
232 | |
239 | |
233 | #define EVLOOP_NONBLOCK 1 /* do not block/wait */ |
240 | #define EVLOOP_NONBLOCK 1 /* do not block/wait */ |
234 | #define EVLOOP_ONESHOT 2 /* block *once* only */ |
241 | #define EVLOOP_ONESHOT 2 /* block *once* only */ |
235 | #define EVUNLOOP_ONCE 1 /* unloop once */ |
242 | #define EVUNLOOP_ONCE 1 /* unloop once */ |
… | |
… | |
285 | void ev_io_start (EV_P_ struct ev_io *w); |
292 | void ev_io_start (EV_P_ struct ev_io *w); |
286 | void ev_io_stop (EV_P_ struct ev_io *w); |
293 | void ev_io_stop (EV_P_ struct ev_io *w); |
287 | |
294 | |
288 | void ev_timer_start (EV_P_ struct ev_timer *w); |
295 | void ev_timer_start (EV_P_ struct ev_timer *w); |
289 | void ev_timer_stop (EV_P_ struct ev_timer *w); |
296 | void ev_timer_stop (EV_P_ struct ev_timer *w); |
290 | void ev_timer_again (EV_P_ struct ev_timer *w); /* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */ |
297 | /* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */ |
|
|
298 | void ev_timer_again (EV_P_ struct ev_timer *w); |
291 | |
299 | |
292 | void ev_periodic_start (EV_P_ struct ev_periodic *w); |
300 | void ev_periodic_start (EV_P_ struct ev_periodic *w); |
293 | void ev_periodic_stop (EV_P_ struct ev_periodic *w); |
301 | void ev_periodic_stop (EV_P_ struct ev_periodic *w); |
294 | |
302 | |
|
|
303 | void ev_idle_start (EV_P_ struct ev_idle *w); |
|
|
304 | void ev_idle_stop (EV_P_ struct ev_idle *w); |
|
|
305 | |
|
|
306 | void ev_prepare_start (EV_P_ struct ev_prepare *w); |
|
|
307 | void ev_prepare_stop (EV_P_ struct ev_prepare *w); |
|
|
308 | |
|
|
309 | void ev_check_start (EV_P_ struct ev_check *w); |
|
|
310 | void ev_check_stop (EV_P_ struct ev_check *w); |
|
|
311 | |
|
|
312 | /* only supported in the default loop */ |
295 | void ev_signal_start (EV_P_ struct ev_signal *w); |
313 | void ev_signal_start (EV_P_ struct ev_signal *w); |
296 | void ev_signal_stop (EV_P_ struct ev_signal *w); |
314 | void ev_signal_stop (EV_P_ struct ev_signal *w); |
297 | |
315 | |
298 | void ev_idle_start (EV_P_ struct ev_idle *w); |
316 | /* only supported in the default loop */ |
299 | void ev_idle_stop (EV_P_ struct ev_idle *w); |
|
|
300 | |
|
|
301 | void ev_prepare_start (EV_P_ struct ev_prepare *w); |
|
|
302 | void ev_prepare_stop (EV_P_ struct ev_prepare *w); |
|
|
303 | |
|
|
304 | void ev_check_start (EV_P_ struct ev_check *w); |
|
|
305 | void ev_check_stop (EV_P_ struct ev_check *w); |
|
|
306 | |
|
|
307 | void ev_child_start (EV_P_ struct ev_child *w); |
317 | void ev_child_start (EV_P_ struct ev_child *w); |
308 | void ev_child_stop (EV_P_ struct ev_child *w); |
318 | void ev_child_stop (EV_P_ struct ev_child *w); |
309 | #endif |
319 | #endif |
310 | |
320 | |
311 | #ifdef __cplusplus |
321 | #ifdef __cplusplus |