… | |
… | |
459 | |
459 | |
460 | /* create and destroy alternative loops that don't handle signals */ |
460 | /* create and destroy alternative loops that don't handle signals */ |
461 | struct ev_loop *ev_loop_new (unsigned int flags); |
461 | struct ev_loop *ev_loop_new (unsigned int flags); |
462 | void ev_loop_destroy (EV_P); |
462 | void ev_loop_destroy (EV_P); |
463 | void ev_loop_fork (EV_P); |
463 | void ev_loop_fork (EV_P); |
464 | void ev_loop_verify (EV_P); |
|
|
465 | |
464 | |
466 | ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */ |
465 | ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */ |
467 | void ev_now_update (EV_P); |
466 | void ev_now_update (EV_P); |
468 | |
467 | |
469 | #else |
468 | #else |
… | |
… | |
496 | /* if you create alternative loops you have to call ev_loop_fork on them */ |
495 | /* if you create alternative loops you have to call ev_loop_fork on them */ |
497 | /* you can call it in either the parent or the child */ |
496 | /* you can call it in either the parent or the child */ |
498 | /* you can actually call it at any time, anywhere :) */ |
497 | /* you can actually call it at any time, anywhere :) */ |
499 | void ev_default_fork (void); |
498 | void ev_default_fork (void); |
500 | |
499 | |
|
|
500 | unsigned int ev_backend (EV_P); /* backend in use by loop */ |
|
|
501 | unsigned int ev_loop_count (EV_P); /* number of loop iterations */ |
|
|
502 | unsigned int ev_loop_depth (EV_P); /* #ev_loop enters - #ev_loop leaves */ |
|
|
503 | void ev_loop_verify (EV_P); /* abort if loop data corrupted */ |
|
|
504 | |
501 | #if EV_WALK_ENABLE |
505 | #if EV_WALK_ENABLE |
502 | /* walk (almost) all watchers in the loop of a given type, invoking the */ |
506 | /* walk (almost) all watchers in the loop of a given type, invoking the */ |
503 | /* callback on every such watcher. The callback might stop the watcher, */ |
507 | /* callback on every such watcher. The callback might stop the watcher, */ |
504 | /* but do nothing else with the loop */ |
508 | /* but do nothing else with the loop */ |
505 | void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)); |
509 | void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)); |
506 | #endif |
510 | #endif |
507 | |
511 | |
508 | unsigned int ev_backend (EV_P); /* backend in use by loop */ |
|
|
509 | unsigned int ev_loop_count (EV_P); /* number of loop iterations */ |
|
|
510 | #endif /* prototypes */ |
512 | #endif /* prototypes */ |
511 | |
513 | |
512 | #define EVLOOP_NONBLOCK 1 /* do not block/wait */ |
514 | #define EVLOOP_NONBLOCK 1 /* do not block/wait */ |
513 | #define EVLOOP_ONESHOT 2 /* block *once* only */ |
515 | #define EVLOOP_ONESHOT 2 /* block *once* only */ |
514 | #define EVUNLOOP_CANCEL 0 /* undo unloop */ |
516 | #define EVUNLOOP_CANCEL 0 /* undo unloop */ |