… | |
… | |
25 | static struct ev_idle idler; |
25 | static struct ev_idle idler; |
26 | |
26 | |
27 | static void |
27 | static void |
28 | idle_cb (struct ev_idle *w, int revents) |
28 | idle_cb (struct ev_idle *w, int revents) |
29 | { |
29 | { |
30 | evidle_stop (w); |
30 | ev_idle_stop (w); |
31 | } |
31 | } |
32 | |
32 | |
33 | static void |
33 | static void |
34 | prepare_cb (struct ev_watcher *w, int revents) |
34 | prepare_cb (struct ev_watcher *w, int revents) |
35 | { |
35 | { |
… | |
… | |
42 | if (CORO_NREADY) |
42 | if (CORO_NREADY) |
43 | { |
43 | { |
44 | CORO_CEDE_NOTSELF; |
44 | CORO_CEDE_NOTSELF; |
45 | |
45 | |
46 | if (CORO_NREADY) |
46 | if (CORO_NREADY) |
47 | evidle_start (&idler); |
47 | ev_idle_start (&idler); |
48 | } |
48 | } |
49 | } |
49 | } |
50 | |
50 | |
51 | MODULE = Coro::EV PACKAGE = Coro::EV |
51 | MODULE = Coro::EV PACKAGE = Coro::EV |
52 | |
52 | |
… | |
… | |
55 | BOOT: |
55 | BOOT: |
56 | { |
56 | { |
57 | I_EV_API ("Coro::EV"); |
57 | I_EV_API ("Coro::EV"); |
58 | I_CORO_API ("Coro::Event"); |
58 | I_CORO_API ("Coro::Event"); |
59 | |
59 | |
60 | evprepare_init (&scheduler, prepare_cb); |
60 | ev_prepare_init (&scheduler, prepare_cb); |
61 | evprepare_start (&scheduler); |
61 | ev_prepare_start (&scheduler); |
62 | |
62 | |
63 | evidle_init (&idler, idle_cb); |
63 | ev_idle_init (&idler, idle_cb); |
64 | } |
64 | } |
65 | |
65 | |
66 | void |
66 | void |
67 | _timed_io_once (...) |
67 | _timed_io_once (...) |
68 | CODE: |
68 | CODE: |