ext/libev/ev.h in rev-0.2.2 vs ext/libev/ev.h in rev-0.2.3
- old
+ new
@@ -1,9 +1,9 @@
/*
* libev native API header
*
- * Copyright (c) 2007,2008 Marc Alexander Lehmann <libev@schmorp.de>
+ * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
@@ -88,10 +88,14 @@
#endif
/*****************************************************************************/
#if EV_STAT_ENABLE
+# ifdef _WIN32
+# include <time.h>
+# include <sys/types.h>
+# endif
# include <sys/stat.h>
#endif
/* support multiple event loops? */
#if EV_MULTIPLICITY
@@ -161,22 +165,23 @@
# define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents))
#endif
/*
* struct member types:
- * private: you can look at them, but not change them, and they might not mean anything to you.
- * ro: can be read anytime, but only changed when the watcher isn't active
- * rw: can be read and modified anytime, even when the watcher is active
+ * private: you may look at them, but not change them,
+ * and they might not mean anything to you.
+ * ro: can be read anytime, but only changed when the watcher isn't active.
+ * rw: can be read and modified anytime, even when the watcher is active.
*
* some internal details that might be helpful for debugging:
*
* active is either 0, which means the watcher is not active,
* or the array index of the watcher (periodics, timers)
* or the array index + 1 (most other watchers)
* or simply 1 for watchers that aren't in some array.
* pending is either 0, in which case the watcher isn't,
- * or the array index + 1 in the pendings array.
+ * or the array index + 1 in the pendings array.
*/
/* shared by all watchers */
#define EV_WATCHER(type) \
int active; /* private */ \
@@ -331,11 +336,11 @@
ev_prepare prepare; /* private */
ev_check check; /* unused */
ev_timer timer; /* unused */
ev_periodic periodic; /* unused */
ev_idle idle; /* unused */
- ev_fork fork; /* unused */
+ ev_fork fork; /* private */
} ev_embed;
#endif
#if EV_ASYNC_ENABLE
/* invoked when somebody calls ev_async_send on the watcher */
@@ -450,10 +455,11 @@
void ev_loop_destroy (EV_P);
void ev_loop_fork (EV_P);
void ev_loop_verify (EV_P);
ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
+void ev_now_update (EV_P);
#else
int ev_default_loop (unsigned int flags); /* returns true when successful */
@@ -508,10 +514,10 @@
* should not keep ev_loop from running, unref() after starting, and ref() before stopping.
*/
void ev_ref (EV_P);
void ev_unref (EV_P);
-/* convinience function, wait for a single event, without registering an event watcher */
+/* 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
/* these may evaluate ev multiple times, and the other arguments at most once */