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

Comparing libev/ev.h (file contents):
Revision 1.17 by root, Thu Nov 1 11:11:22 2007 UTC vs.
Revision 1.20 by root, Fri Nov 2 16:54:35 2007 UTC

27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30#ifndef EV_H 30#ifndef EV_H
31#define EV_H 31#define EV_H
32
33#ifdef __cplusplus
34extern "C" {
35#endif
32 36
33typedef double ev_tstamp; 37typedef double ev_tstamp;
34 38
35/* eventmask, revents, events... */ 39/* eventmask, revents, events... */
36#define EV_UNDEF -1 /* guaranteed to be invalid */ 40#define EV_UNDEF -1 /* guaranteed to be invalid */
161 165
162 int pid; /* ro */ 166 int pid; /* ro */
163 int status; /* rw, holds the exit status, use the macros from sys/wait.h */ 167 int status; /* rw, holds the exit status, use the macros from sys/wait.h */
164}; 168};
165 169
166#define EVMETHOD_NONE 0 170#define EVMETHOD_AUTO 0 /* consults environment */
167#define EVMETHOD_SELECT 1 171#define EVMETHOD_SELECT 1
168#define EVMETHOD_EPOLL 2 172#define EVMETHOD_POLL 2
173#define EVMETHOD_EPOLL 4
174#define EVMETHOD_ANY ~0 /* any method, do not consult env */
169#if EV_PROTOTYPES 175#if EV_PROTOTYPES
170extern int ev_method; 176extern int ev_method;
171int ev_init (int flags); /* returns ev_method */ 177int ev_init (int methods); /* returns ev_method */
172int ev_version_major (void); 178int ev_version_major (void);
173int ev_version_minor (void); 179int ev_version_minor (void);
174 180
175/* these three calls are suitable for plugging into pthread_atfork */ 181/* these three calls are suitable for plugging into pthread_atfork */
176void ev_prefork (void); 182void ev_fork_prepare (void);
177void ev_postfork_parent (void); 183void ev_fork_parent (void);
178void ev_postfork_child (void); 184void ev_fork_child (void);
179 185
180extern ev_tstamp ev_now; /* time w.r.t. timers and the eventloop, updated after each poll */ 186extern ev_tstamp ev_now; /* time w.r.t. timers and the eventloop, updated after each poll */
181ev_tstamp ev_time (void); 187ev_tstamp ev_time (void);
182#endif 188#endif
183 189
243 249
244void ev_child_start (struct ev_child *w); 250void ev_child_start (struct ev_child *w);
245void ev_child_stop (struct ev_child *w); 251void ev_child_stop (struct ev_child *w);
246#endif 252#endif
247 253
254#ifdef __cplusplus
255}
248#endif 256#endif
249 257
258#endif
259

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines