--- libev/ev.h 2009/03/28 22:17:17 1.112 +++ libev/ev.h 2009/04/25 14:12:48 1.115 @@ -82,6 +82,10 @@ # define EV_ASYNC_ENABLE 1 #endif +#ifndef EV_WALK_ENABLE +# define EV_WALK_ENABLE 0 /* not yet */ +#endif + #ifndef EV_ATOMIC_T # include # define EV_ATOMIC_T sig_atomic_t volatile @@ -147,6 +151,7 @@ #define EV_EMBED 0x00010000 /* embedded event loop needs sweep */ #define EV_FORK 0x00020000 /* event loop resumed in child */ #define EV_ASYNC 0x00040000 /* async intra-loop signal */ +#define EV_CUSTOM 0x01000000 /* for use by user code */ #define EV_ERROR 0x80000000 /* sent when an error occurs */ /* can be used to add custom fields to all watchers, while losing binary compatibility */ @@ -493,7 +498,7 @@ /* you can actually call it at any time, anywhere :) */ void ev_default_fork (void); -#if 0 +#if EV_WALK_ENABLE /* walk (almost) all watchers in the loop of a given type, invoking the */ /* callback on every such watcher. The callback might stop the watcher, */ /* but do nothing else with the loop */ @@ -525,8 +530,16 @@ void ev_ref (EV_P); void ev_unref (EV_P); -/* convenience function, wait for a single event, without registering an event watcher */ -/* if timeout is < 0, do wait indefinitely */ +/* + * stop/start the timer handling. + */ +void ev_suspend (EV_P); +void ev_resume (EV_P); + +/* + * convenience function, wait for a single event, without registering an event watcher + * if timeout is < 0, do wait indefinitely + */ void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg); #endif