… | |
… | |
1046 | array_free (fdchange, EMPTY); |
1046 | array_free (fdchange, EMPTY); |
1047 | array_free (timer, EMPTY); |
1047 | array_free (timer, EMPTY); |
1048 | #if EV_PERIODIC_ENABLE |
1048 | #if EV_PERIODIC_ENABLE |
1049 | array_free (periodic, EMPTY); |
1049 | array_free (periodic, EMPTY); |
1050 | #endif |
1050 | #endif |
|
|
1051 | #if EV_FORK_ENABLE |
|
|
1052 | array_free (fork, EMPTY); |
|
|
1053 | #endif |
1051 | array_free (prepare, EMPTY); |
1054 | array_free (prepare, EMPTY); |
1052 | array_free (check, EMPTY); |
1055 | array_free (check, EMPTY); |
1053 | array_free (fork, EMPTY); |
|
|
1054 | |
1056 | |
1055 | backend = 0; |
1057 | backend = 0; |
1056 | } |
1058 | } |
1057 | |
1059 | |
1058 | void inline_size infy_fork (EV_P); |
1060 | void inline_size infy_fork (EV_P); |
… | |
… | |
2180 | |
2182 | |
2181 | #if EV_EMBED_ENABLE |
2183 | #if EV_EMBED_ENABLE |
2182 | void noinline |
2184 | void noinline |
2183 | ev_embed_sweep (EV_P_ ev_embed *w) |
2185 | ev_embed_sweep (EV_P_ ev_embed *w) |
2184 | { |
2186 | { |
2185 | ev_loop (w->loop, EVLOOP_NONBLOCK); |
2187 | ev_loop (w->other, EVLOOP_NONBLOCK); |
2186 | } |
2188 | } |
2187 | |
2189 | |
2188 | static void |
2190 | static void |
2189 | embed_cb (EV_P_ ev_io *io, int revents) |
2191 | embed_cb (EV_P_ ev_io *io, int revents) |
2190 | { |
2192 | { |
… | |
… | |
2201 | { |
2203 | { |
2202 | if (expect_false (ev_is_active (w))) |
2204 | if (expect_false (ev_is_active (w))) |
2203 | return; |
2205 | return; |
2204 | |
2206 | |
2205 | { |
2207 | { |
2206 | struct ev_loop *loop = w->loop; |
2208 | struct ev_loop *loop = w->other; |
2207 | assert (("loop to be embedded is not embeddable", backend & ev_embeddable_backends ())); |
2209 | assert (("loop to be embedded is not embeddable", backend & ev_embeddable_backends ())); |
2208 | ev_io_init (&w->io, embed_cb, backend_fd, EV_READ); |
2210 | ev_io_init (&w->io, embed_cb, backend_fd, EV_READ); |
2209 | } |
2211 | } |
2210 | |
2212 | |
2211 | ev_set_priority (&w->io, ev_priority (w)); |
2213 | ev_set_priority (&w->io, ev_priority (w)); |
… | |
… | |
2318 | ev_timer_set (&once->to, timeout, 0.); |
2320 | ev_timer_set (&once->to, timeout, 0.); |
2319 | ev_timer_start (EV_A_ &once->to); |
2321 | ev_timer_start (EV_A_ &once->to); |
2320 | } |
2322 | } |
2321 | } |
2323 | } |
2322 | |
2324 | |
|
|
2325 | #if EV_MULTIPLICITY |
|
|
2326 | #include "ev_wrap.h" |
|
|
2327 | #endif |
|
|
2328 | |
2323 | #ifdef __cplusplus |
2329 | #ifdef __cplusplus |
2324 | } |
2330 | } |
2325 | #endif |
2331 | #endif |
2326 | |
2332 | |