diff options
author | root <root> | 2008-09-29 03:31:14 +0000 |
---|---|---|
committer | root <root> | 2008-09-29 03:31:14 +0000 |
commit | 2736c2b0a7a4e6fbb8fdb117eef4cef1a2261eb1 (patch) | |
tree | 3c53e7ec2655dd5652f9e3a55607da9da0885067 /ev.c | |
parent | 96ee63afe7f6aa865a8cfd2ac761e81a9a051b52 (diff) |
3.44rel-3_44
Diffstat (limited to 'ev.c')
-rw-r--r-- | ev.c | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -2835,6 +2835,18 @@ embed_prepare_cb (EV_P_ ev_prepare *prepare, int revents) } } +static void +embed_fork_cb (EV_P_ ev_fork *fork_w, int revents) +{ + ev_embed *w = (ev_embed *)(((char *)fork_w) - offsetof (ev_embed, fork)); + + { + struct ev_loop *loop = w->other; + + ev_loop_fork (EV_A); + } +} + #if 0 static void embed_idle_cb (EV_P_ ev_idle *idle, int revents) @@ -2864,6 +2876,9 @@ ev_embed_start (EV_P_ ev_embed *w) ev_set_priority (&w->prepare, EV_MINPRI); ev_prepare_start (EV_A_ &w->prepare); + ev_fork_init (&w->fork, embed_fork_cb); + ev_fork_start (EV_A_ &w->fork); + /*ev_idle_init (&w->idle, e,bed_idle_cb);*/ ev_start (EV_A_ (W)w, 1); @@ -2880,10 +2895,9 @@ ev_embed_stop (EV_P_ ev_embed *w) EV_FREQUENT_CHECK; - ev_io_stop (EV_A_ &w->io); + ev_io_stop (EV_A_ &w->io); ev_prepare_stop (EV_A_ &w->prepare); - - ev_stop (EV_A_ (W)w); + ev_fork_stop (EV_A_ &w->fork); EV_FREQUENT_CHECK; } |