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

Comparing libev/ev.h (file contents):
Revision 1.29 by root, Sun Nov 4 00:24:17 2007 UTC vs.
Revision 1.30 by root, Sun Nov 4 15:58:50 2007 UTC

210 210
211#if EV_PROTOTYPES 211#if EV_PROTOTYPES
212int ev_version_major (void); 212int ev_version_major (void);
213int ev_version_minor (void); 213int ev_version_minor (void);
214 214
215/* these three calls are suitable for plugging into pthread_atfork */
216void ev_fork_prepare (void);
217void ev_fork_parent (void);
218void ev_fork_child (void);
219
220ev_tstamp ev_time (void); 215ev_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 */
220struct ev_loop *ev_default_loop (int methods); /* returns default loop */
221
222/* create and destroy alternative loops that don't handle signals */
223struct ev_loop *ev_loop_new (int methods); 223struct ev_loop *ev_loop_new (int methods);
224void ev_loop_delete (EV_P); 224void ev_loop_destroy (EV_P);
225void ev_loop_fork (EV_P);
225# else 226# else
226int ev_init (int methods); /* returns ev_method */ 227int ev_default_loop (int methods); /* returns true when successful */
227# endif 228# endif
228 229
230void 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 :) */
235void ev_default_fork (void);
236
229int ev_method (EV_P); 237int 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 */
285void ev_io_start (EV_P_ struct ev_io *w); 292void ev_io_start (EV_P_ struct ev_io *w);
286void ev_io_stop (EV_P_ struct ev_io *w); 293void ev_io_stop (EV_P_ struct ev_io *w);
287 294
288void ev_timer_start (EV_P_ struct ev_timer *w); 295void ev_timer_start (EV_P_ struct ev_timer *w);
289void ev_timer_stop (EV_P_ struct ev_timer *w); 296void ev_timer_stop (EV_P_ struct ev_timer *w);
290void 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 */
298void ev_timer_again (EV_P_ struct ev_timer *w);
291 299
292void ev_periodic_start (EV_P_ struct ev_periodic *w); 300void ev_periodic_start (EV_P_ struct ev_periodic *w);
293void ev_periodic_stop (EV_P_ struct ev_periodic *w); 301void ev_periodic_stop (EV_P_ struct ev_periodic *w);
294 302
303void ev_idle_start (EV_P_ struct ev_idle *w);
304void ev_idle_stop (EV_P_ struct ev_idle *w);
305
306void ev_prepare_start (EV_P_ struct ev_prepare *w);
307void ev_prepare_stop (EV_P_ struct ev_prepare *w);
308
309void ev_check_start (EV_P_ struct ev_check *w);
310void ev_check_stop (EV_P_ struct ev_check *w);
311
312/* only supported in the default loop */
295void ev_signal_start (EV_P_ struct ev_signal *w); 313void ev_signal_start (EV_P_ struct ev_signal *w);
296void ev_signal_stop (EV_P_ struct ev_signal *w); 314void ev_signal_stop (EV_P_ struct ev_signal *w);
297 315
298void ev_idle_start (EV_P_ struct ev_idle *w); 316/* only supported in the default loop */
299void ev_idle_stop (EV_P_ struct ev_idle *w);
300
301void ev_prepare_start (EV_P_ struct ev_prepare *w);
302void ev_prepare_stop (EV_P_ struct ev_prepare *w);
303
304void ev_check_start (EV_P_ struct ev_check *w);
305void ev_check_stop (EV_P_ struct ev_check *w);
306
307void ev_child_start (EV_P_ struct ev_child *w); 317void ev_child_start (EV_P_ struct ev_child *w);
308void ev_child_stop (EV_P_ struct ev_child *w); 318void ev_child_stop (EV_P_ struct ev_child *w);
309#endif 319#endif
310 320
311#ifdef __cplusplus 321#ifdef __cplusplus

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines