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

Comparing libev/event.h (file contents):
Revision 1.1 by root, Thu Nov 1 15:22:12 2007 UTC vs.
Revision 1.4 by root, Fri Nov 2 13:08:51 2007 UTC

36#endif 36#endif
37 37
38#include "ev.h" 38#include "ev.h"
39 39
40struct event 40struct event
41 { 41{
42 /* lib watchers we map to */
43 union {
42 struct ev_io io; 44 struct ev_io io;
45 struct ev_signal sig;
46 } iosig;
43 struct ev_timer to; 47 struct ev_timer to;
44 struct ev_signal sig;
45 48
49 /* compatibility slots */
46 struct event_base *ev_base; 50 struct event_base *ev_base;
47 int ev_fd;
48 short ev_events;
49 int ev_pri;
50 void (*ev_callback)(int, short, void *arg); 51 void (*ev_callback)(int, short, void *arg);
51 void *ev_arg; 52 void *ev_arg;
53 int ev_fd;
54 int ev_pri;
52 int ev_res; 55 int ev_res;
56 short ev_events;
53}; 57};
54 58
55#define EV_PERSIST 0x10 59#define EV_PERSIST 0x10
56 60
57#define EVENT_SIGNAL(ev) ((int) (ev)->ev_fd) 61#define EVENT_SIGNAL(ev) ((int) (ev)->ev_fd)
98void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg); 102void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg);
99int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); 103int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv);
100 104
101int event_add (struct event *ev, struct timeval *tv); 105int event_add (struct event *ev, struct timeval *tv);
102int event_del (struct event *ev); 106int event_del (struct event *ev);
103void event_active (struct event *ev, int fd, short events);
104 107
105int event_pending (struct event *ev, short, struct timeval *tv); 108int event_pending (struct event *ev, short, struct timeval *tv);
106 109
107int event_priority_init (int npri); 110int event_priority_init (int npri);
108int event_priority_set (struct event *ev, int pri); 111int event_priority_set (struct event *ev, int pri);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines