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

Comparing libev/ev.h (file contents):
Revision 1.150 by root, Sun Oct 24 18:05:53 2010 UTC vs.
Revision 1.154 by root, Thu Oct 28 04:55:19 2010 UTC

98#ifndef EV_IDLE_ENABLE 98#ifndef EV_IDLE_ENABLE
99# define EV_IDLE_ENABLE EV_FEATURE_WATCHERS 99# define EV_IDLE_ENABLE EV_FEATURE_WATCHERS
100#endif 100#endif
101 101
102#ifndef EV_FORK_ENABLE 102#ifndef EV_FORK_ENABLE
103# define EV_FORK_ENABLE 0 /* not implemented */ 103# define EV_FORK_ENABLE EV_FEATURE_WATCHERS
104#endif 104#endif
105 105
106#ifndef EV_CLEANUP_ENABLE 106#ifndef EV_CLEANUP_ENABLE
107# define EV_CLEANUP_ENABLE EV_FEATURE_WATCHERS 107# define EV_CLEANUP_ENABLE EV_FEATURE_WATCHERS
108#endif 108#endif
195#define EV_VERSION_MAJOR 4 195#define EV_VERSION_MAJOR 4
196#define EV_VERSION_MINOR 0 196#define EV_VERSION_MINOR 0
197 197
198/* eventmask, revents, events... */ 198/* eventmask, revents, events... */
199enum { 199enum {
200 EV_UNDEF = -1, /* guaranteed to be invalid */ 200 EV_UNDEF = 0xFFFFFFFF, /* guaranteed to be invalid */
201 EV_NONE = 0x00, /* no events */ 201 EV_NONE = 0x00, /* no events */
202 EV_READ = 0x01, /* ev_io detected read will not block */ 202 EV_READ = 0x01, /* ev_io detected read will not block */
203 EV_WRITE = 0x02, /* ev_io detected write will not block */ 203 EV_WRITE = 0x02, /* ev_io detected write will not block */
204 EV__IOFDSET = 0x80, /* internal use only */ 204 EV__IOFDSET = 0x80, /* internal use only */
205 EV_IO = EV_READ, /* alias for type-detection */ 205 EV_IO = EV_READ, /* alias for type-detection */
425 ev_check check; /* unused */ 425 ev_check check; /* unused */
426 ev_timer timer; /* unused */ 426 ev_timer timer; /* unused */
427 ev_periodic periodic; /* unused */ 427 ev_periodic periodic; /* unused */
428 ev_idle idle; /* unused */ 428 ev_idle idle; /* unused */
429 ev_fork fork; /* private */ 429 ev_fork fork; /* private */
430#if EV_CLEANUP_ENABLE
430 ev_cleanup cleanup; /* unused */ 431 ev_cleanup cleanup; /* unused */
432#endif
431} ev_embed; 433} ev_embed;
432#endif 434#endif
433 435
434#if EV_ASYNC_ENABLE 436#if EV_ASYNC_ENABLE
435/* invoked when somebody calls ev_async_send on the watcher */ 437/* invoked when somebody calls ev_async_send on the watcher */
548 return EV_A == EV_DEFAULT_UC; 550 return EV_A == EV_DEFAULT_UC;
549} 551}
550 552
551/* create and destroy alternative loops that don't handle signals */ 553/* create and destroy alternative loops that don't handle signals */
552struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0)); 554struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0));
553/* destroy event loops, also works for the default loop */
554void ev_loop_destroy (EV_P);
555 555
556ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */ 556ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
557 557
558#else 558#else
559 559
573{ 573{
574 return 1; 574 return 1;
575} 575}
576 576
577#endif /* multiplicity */ 577#endif /* multiplicity */
578
579/* destroy event loops, also works for the default loop */
580void ev_loop_destroy (EV_P);
578 581
579/* this needs to be called after fork, to duplicate the loop */ 582/* this needs to be called after fork, to duplicate the loop */
580/* when you want to re-use it in the child */ 583/* when you want to re-use it in the child */
581/* you can call it in either the parent or the child */ 584/* you can call it in either the parent or the child */
582/* you can actually call it at any time, anywhere :) */ 585/* you can actually call it at any time, anywhere :) */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines