… | |
… | |
246 | ev_timer_stop (EV_A_ &ev->to); |
246 | ev_timer_stop (EV_A_ &ev->to); |
247 | |
247 | |
248 | return 0; |
248 | return 0; |
249 | } |
249 | } |
250 | |
250 | |
|
|
251 | void event_active (struct event *ev, int res, short ncalls) |
|
|
252 | { |
|
|
253 | if (res & EV_TIMEOUT) |
|
|
254 | ev_feed_event (&iosig.to, res & EV_TIMEOUT); |
|
|
255 | |
|
|
256 | if (res & EV_SIGNAL) |
|
|
257 | ev_feed_event (&iosig.sig, res & EV_SIGNAL); |
|
|
258 | |
|
|
259 | if (res & (EV_READ | EV_WRITE)) |
|
|
260 | ev_feed_event (&iosig.io, res & (EV_READ | EV_WRITE)); |
|
|
261 | } |
|
|
262 | |
251 | int event_pending (struct event *ev, short events, struct timeval *tv) |
263 | int event_pending (struct event *ev, short events, struct timeval *tv) |
252 | { |
264 | { |
253 | short revents = 0; |
265 | short revents = 0; |
254 | dLOOPev; |
266 | dLOOPev; |
255 | |
267 | |