… | |
… | |
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 |
|
|
34 | extern "C" { |
|
|
35 | #endif |
32 | |
36 | |
33 | typedef double ev_tstamp; |
37 | typedef 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 |
170 | extern int ev_method; |
176 | extern int ev_method; |
171 | int ev_init (int flags); /* returns ev_method */ |
177 | int ev_init (int methods); /* returns ev_method */ |
172 | int ev_version_major (void); |
178 | int ev_version_major (void); |
173 | int ev_version_minor (void); |
179 | int 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 */ |
176 | void ev_fork_prepare (void); |
182 | void ev_fork_prepare (void); |
… | |
… | |
243 | |
249 | |
244 | void ev_child_start (struct ev_child *w); |
250 | void ev_child_start (struct ev_child *w); |
245 | void ev_child_stop (struct ev_child *w); |
251 | void 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 | |