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

Comparing libev/ev.c (file contents):
Revision 1.185 by root, Fri Dec 14 18:22:30 2007 UTC vs.
Revision 1.188 by root, Thu Dec 20 07:12:57 2007 UTC

1038#if EV_IDLE_ENABLE 1038#if EV_IDLE_ENABLE
1039 array_free (idle, [i]); 1039 array_free (idle, [i]);
1040#endif 1040#endif
1041 } 1041 }
1042 1042
1043 ev_free (anfds); anfdmax = 0;
1044
1043 /* have to use the microsoft-never-gets-it-right macro */ 1045 /* have to use the microsoft-never-gets-it-right macro */
1044 array_free (fdchange, EMPTY); 1046 array_free (fdchange, EMPTY);
1045 array_free (timer, EMPTY); 1047 array_free (timer, EMPTY);
1046#if EV_PERIODIC_ENABLE 1048#if EV_PERIODIC_ENABLE
1047 array_free (periodic, EMPTY); 1049 array_free (periodic, EMPTY);
1050#endif
1051#if EV_FORK_ENABLE
1052 array_free (fork, EMPTY);
1048#endif 1053#endif
1049 array_free (prepare, EMPTY); 1054 array_free (prepare, EMPTY);
1050 array_free (check, EMPTY); 1055 array_free (check, EMPTY);
1051 1056
1052 backend = 0; 1057 backend = 0;
2177 2182
2178#if EV_EMBED_ENABLE 2183#if EV_EMBED_ENABLE
2179void noinline 2184void noinline
2180ev_embed_sweep (EV_P_ ev_embed *w) 2185ev_embed_sweep (EV_P_ ev_embed *w)
2181{ 2186{
2182 ev_loop (w->loop, EVLOOP_NONBLOCK); 2187 ev_loop (w->other, EVLOOP_NONBLOCK);
2183} 2188}
2184 2189
2185static void 2190static void
2186embed_cb (EV_P_ ev_io *io, int revents) 2191embed_cb (EV_P_ ev_io *io, int revents)
2187{ 2192{
2198{ 2203{
2199 if (expect_false (ev_is_active (w))) 2204 if (expect_false (ev_is_active (w)))
2200 return; 2205 return;
2201 2206
2202 { 2207 {
2203 struct ev_loop *loop = w->loop; 2208 struct ev_loop *loop = w->other;
2204 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 ()));
2205 ev_io_init (&w->io, embed_cb, backend_fd, EV_READ); 2210 ev_io_init (&w->io, embed_cb, backend_fd, EV_READ);
2206 } 2211 }
2207 2212
2208 ev_set_priority (&w->io, ev_priority (w)); 2213 ev_set_priority (&w->io, ev_priority (w));
2315 ev_timer_set (&once->to, timeout, 0.); 2320 ev_timer_set (&once->to, timeout, 0.);
2316 ev_timer_start (EV_A_ &once->to); 2321 ev_timer_start (EV_A_ &once->to);
2317 } 2322 }
2318} 2323}
2319 2324
2325#if EV_MULTIPLICITY
2326 #include "ev_wrap.h"
2327#endif
2328
2320#ifdef __cplusplus 2329#ifdef __cplusplus
2321} 2330}
2322#endif 2331#endif
2323 2332

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines