cool.io 1.4.1-x64-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +29 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +13 -0
  5. data/CHANGES.md +229 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE +20 -0
  8. data/README.md +166 -0
  9. data/Rakefile +79 -0
  10. data/cool.io.gemspec +29 -0
  11. data/examples/callbacked_echo_server.rb +24 -0
  12. data/examples/dslified_echo_client.rb +34 -0
  13. data/examples/dslified_echo_server.rb +24 -0
  14. data/examples/echo_client.rb +38 -0
  15. data/examples/echo_server.rb +27 -0
  16. data/examples/google.rb +9 -0
  17. data/ext/cool.io/.gitignore +5 -0
  18. data/ext/cool.io/cool.io.h +59 -0
  19. data/ext/cool.io/cool.io_ext.c +25 -0
  20. data/ext/cool.io/ev_wrap.h +10 -0
  21. data/ext/cool.io/extconf.rb +61 -0
  22. data/ext/cool.io/iowatcher.c +189 -0
  23. data/ext/cool.io/libev.c +8 -0
  24. data/ext/cool.io/loop.c +261 -0
  25. data/ext/cool.io/stat_watcher.c +269 -0
  26. data/ext/cool.io/timer_watcher.c +219 -0
  27. data/ext/cool.io/utils.c +122 -0
  28. data/ext/cool.io/watcher.c +264 -0
  29. data/ext/cool.io/watcher.h +71 -0
  30. data/ext/iobuffer/extconf.rb +9 -0
  31. data/ext/iobuffer/iobuffer.c +767 -0
  32. data/ext/libev/Changes +507 -0
  33. data/ext/libev/LICENSE +37 -0
  34. data/ext/libev/README +58 -0
  35. data/ext/libev/README.embed +3 -0
  36. data/ext/libev/ev.c +5054 -0
  37. data/ext/libev/ev.h +853 -0
  38. data/ext/libev/ev_epoll.c +282 -0
  39. data/ext/libev/ev_kqueue.c +214 -0
  40. data/ext/libev/ev_poll.c +148 -0
  41. data/ext/libev/ev_port.c +185 -0
  42. data/ext/libev/ev_select.c +362 -0
  43. data/ext/libev/ev_vars.h +204 -0
  44. data/ext/libev/ev_win32.c +163 -0
  45. data/ext/libev/ev_wrap.h +200 -0
  46. data/ext/libev/ruby_gil.patch +97 -0
  47. data/ext/libev/test_libev_win32.c +123 -0
  48. data/ext/libev/win_select.patch +115 -0
  49. data/lib/.gitignore +2 -0
  50. data/lib/cool.io.rb +34 -0
  51. data/lib/cool.io/async_watcher.rb +43 -0
  52. data/lib/cool.io/custom_require.rb +9 -0
  53. data/lib/cool.io/dns_resolver.rb +219 -0
  54. data/lib/cool.io/dsl.rb +139 -0
  55. data/lib/cool.io/io.rb +194 -0
  56. data/lib/cool.io/iowatcher.rb +17 -0
  57. data/lib/cool.io/listener.rb +99 -0
  58. data/lib/cool.io/loop.rb +122 -0
  59. data/lib/cool.io/meta.rb +49 -0
  60. data/lib/cool.io/server.rb +75 -0
  61. data/lib/cool.io/socket.rb +230 -0
  62. data/lib/cool.io/timer_watcher.rb +17 -0
  63. data/lib/cool.io/version.rb +7 -0
  64. data/lib/coolio.rb +2 -0
  65. data/spec/async_watcher_spec.rb +57 -0
  66. data/spec/dns_spec.rb +43 -0
  67. data/spec/iobuffer_spec.rb +147 -0
  68. data/spec/spec_helper.rb +19 -0
  69. data/spec/stat_watcher_spec.rb +77 -0
  70. data/spec/tcp_server_spec.rb +225 -0
  71. data/spec/tcp_socket_spec.rb +185 -0
  72. data/spec/timer_watcher_spec.rb +59 -0
  73. data/spec/udp_socket_spec.rb +58 -0
  74. data/spec/unix_listener_spec.rb +25 -0
  75. data/spec/unix_server_spec.rb +27 -0
  76. metadata +182 -0
@@ -0,0 +1,204 @@
1
+ /*
2
+ * loop member variable declarations
3
+ *
4
+ * Copyright (c) 2007,2008,2009,2010,2011,2012,2013 Marc Alexander Lehmann <libev@schmorp.de>
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without modifica-
8
+ * tion, are permitted provided that the following conditions are met:
9
+ *
10
+ * 1. Redistributions of source code must retain the above copyright notice,
11
+ * this list of conditions and the following disclaimer.
12
+ *
13
+ * 2. Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in the
15
+ * documentation and/or other materials provided with the distribution.
16
+ *
17
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
18
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
19
+ * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
20
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
21
+ * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
25
+ * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ *
28
+ * Alternatively, the contents of this file may be used under the terms of
29
+ * the GNU General Public License ("GPL") version 2 or any later version,
30
+ * in which case the provisions of the GPL are applicable instead of
31
+ * the above. If you wish to allow the use of your version of this file
32
+ * only under the terms of the GPL and not to allow others to use your
33
+ * version of this file under the BSD license, indicate your decision
34
+ * by deleting the provisions above and replace them with the notice
35
+ * and other provisions required by the GPL. If you do not delete the
36
+ * provisions above, a recipient may use your version of this file under
37
+ * either the BSD or the GPL.
38
+ */
39
+
40
+ #define VARx(type,name) VAR(name, type name)
41
+
42
+ VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */
43
+ VARx(ev_tstamp, mn_now) /* monotonic clock "now" */
44
+ VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */
45
+
46
+ /* for reverse feeding of events */
47
+ VARx(W *, rfeeds)
48
+ VARx(int, rfeedmax)
49
+ VARx(int, rfeedcnt)
50
+
51
+ VAR (pendings, ANPENDING *pendings [NUMPRI])
52
+ VAR (pendingmax, int pendingmax [NUMPRI])
53
+ VAR (pendingcnt, int pendingcnt [NUMPRI])
54
+ VARx(int, pendingpri) /* highest priority currently pending */
55
+ VARx(ev_prepare, pending_w) /* dummy pending watcher */
56
+
57
+ VARx(ev_tstamp, io_blocktime)
58
+ VARx(ev_tstamp, timeout_blocktime)
59
+
60
+ VARx(int, backend)
61
+ VARx(int, activecnt) /* total number of active events ("refcount") */
62
+ VARx(EV_ATOMIC_T, loop_done) /* signal by ev_break */
63
+
64
+ VARx(int, backend_fd)
65
+ VARx(ev_tstamp, backend_mintime) /* assumed typical timer resolution */
66
+ VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev))
67
+ VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout))
68
+
69
+ VARx(ANFD *, anfds)
70
+ VARx(int, anfdmax)
71
+
72
+ VAR (evpipe, int evpipe [2])
73
+ VARx(ev_io, pipe_w)
74
+ VARx(EV_ATOMIC_T, pipe_write_wanted)
75
+ VARx(EV_ATOMIC_T, pipe_write_skipped)
76
+
77
+ #if !defined(_WIN32) || EV_GENWRAP
78
+ VARx(pid_t, curpid)
79
+ #endif
80
+
81
+ VARx(char, postfork) /* true if we need to recreate kernel state after fork */
82
+
83
+ #if EV_USE_SELECT || EV_GENWRAP
84
+ VARx(void *, vec_ri)
85
+ VARx(void *, vec_ro)
86
+ VARx(void *, vec_wi)
87
+ VARx(void *, vec_wo)
88
+ #if defined(_WIN32) || EV_GENWRAP
89
+ VARx(void *, vec_eo)
90
+ #endif
91
+ VARx(int, vec_max)
92
+ #endif
93
+
94
+ #if EV_USE_POLL || EV_GENWRAP
95
+ VARx(struct pollfd *, polls)
96
+ VARx(int, pollmax)
97
+ VARx(int, pollcnt)
98
+ VARx(int *, pollidxs) /* maps fds into structure indices */
99
+ VARx(int, pollidxmax)
100
+ #endif
101
+
102
+ #if EV_USE_EPOLL || EV_GENWRAP
103
+ VARx(struct epoll_event *, epoll_events)
104
+ VARx(int, epoll_eventmax)
105
+ VARx(int *, epoll_eperms)
106
+ VARx(int, epoll_epermcnt)
107
+ VARx(int, epoll_epermmax)
108
+ #endif
109
+
110
+ #if EV_USE_KQUEUE || EV_GENWRAP
111
+ VARx(pid_t, kqueue_fd_pid)
112
+ VARx(struct kevent *, kqueue_changes)
113
+ VARx(int, kqueue_changemax)
114
+ VARx(int, kqueue_changecnt)
115
+ VARx(struct kevent *, kqueue_events)
116
+ VARx(int, kqueue_eventmax)
117
+ #endif
118
+
119
+ #if EV_USE_PORT || EV_GENWRAP
120
+ VARx(struct port_event *, port_events)
121
+ VARx(int, port_eventmax)
122
+ #endif
123
+
124
+ #if EV_USE_IOCP || EV_GENWRAP
125
+ VARx(HANDLE, iocp)
126
+ #endif
127
+
128
+ VARx(int *, fdchanges)
129
+ VARx(int, fdchangemax)
130
+ VARx(int, fdchangecnt)
131
+
132
+ VARx(ANHE *, timers)
133
+ VARx(int, timermax)
134
+ VARx(int, timercnt)
135
+
136
+ #if EV_PERIODIC_ENABLE || EV_GENWRAP
137
+ VARx(ANHE *, periodics)
138
+ VARx(int, periodicmax)
139
+ VARx(int, periodiccnt)
140
+ #endif
141
+
142
+ #if EV_IDLE_ENABLE || EV_GENWRAP
143
+ VAR (idles, ev_idle **idles [NUMPRI])
144
+ VAR (idlemax, int idlemax [NUMPRI])
145
+ VAR (idlecnt, int idlecnt [NUMPRI])
146
+ #endif
147
+ VARx(int, idleall) /* total number */
148
+
149
+ VARx(struct ev_prepare **, prepares)
150
+ VARx(int, preparemax)
151
+ VARx(int, preparecnt)
152
+
153
+ VARx(struct ev_check **, checks)
154
+ VARx(int, checkmax)
155
+ VARx(int, checkcnt)
156
+
157
+ #if EV_FORK_ENABLE || EV_GENWRAP
158
+ VARx(struct ev_fork **, forks)
159
+ VARx(int, forkmax)
160
+ VARx(int, forkcnt)
161
+ #endif
162
+
163
+ #if EV_CLEANUP_ENABLE || EV_GENWRAP
164
+ VARx(struct ev_cleanup **, cleanups)
165
+ VARx(int, cleanupmax)
166
+ VARx(int, cleanupcnt)
167
+ #endif
168
+
169
+ #if EV_ASYNC_ENABLE || EV_GENWRAP
170
+ VARx(EV_ATOMIC_T, async_pending)
171
+ VARx(struct ev_async **, asyncs)
172
+ VARx(int, asyncmax)
173
+ VARx(int, asynccnt)
174
+ #endif
175
+
176
+ #if EV_USE_INOTIFY || EV_GENWRAP
177
+ VARx(int, fs_fd)
178
+ VARx(ev_io, fs_w)
179
+ VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */
180
+ VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE])
181
+ #endif
182
+
183
+ VARx(EV_ATOMIC_T, sig_pending)
184
+ #if EV_USE_SIGNALFD || EV_GENWRAP
185
+ VARx(int, sigfd)
186
+ VARx(ev_io, sigfd_w)
187
+ VARx(sigset_t, sigfd_set)
188
+ #endif
189
+
190
+ VARx(unsigned int, origflags) /* original loop flags */
191
+
192
+ #if EV_FEATURE_API || EV_GENWRAP
193
+ VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */
194
+ VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */
195
+
196
+ VARx(void *, userdata)
197
+ /* C++ doesn't support the ev_loop_callback typedef here. stinks. */
198
+ VAR (release_cb, void (*release_cb)(EV_P) EV_THROW)
199
+ VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_THROW)
200
+ VAR (invoke_cb , ev_loop_callback invoke_cb)
201
+ #endif
202
+
203
+ #undef VARx
204
+
@@ -0,0 +1,163 @@
1
+ /*
2
+ * libev win32 compatibility cruft (_not_ a backend)
3
+ *
4
+ * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev@schmorp.de>
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without modifica-
8
+ * tion, are permitted provided that the following conditions are met:
9
+ *
10
+ * 1. Redistributions of source code must retain the above copyright notice,
11
+ * this list of conditions and the following disclaimer.
12
+ *
13
+ * 2. Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in the
15
+ * documentation and/or other materials provided with the distribution.
16
+ *
17
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
18
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
19
+ * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
20
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
21
+ * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
25
+ * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ *
28
+ * Alternatively, the contents of this file may be used under the terms of
29
+ * the GNU General Public License ("GPL") version 2 or any later version,
30
+ * in which case the provisions of the GPL are applicable instead of
31
+ * the above. If you wish to allow the use of your version of this file
32
+ * only under the terms of the GPL and not to allow others to use your
33
+ * version of this file under the BSD license, indicate your decision
34
+ * by deleting the provisions above and replace them with the notice
35
+ * and other provisions required by the GPL. If you do not delete the
36
+ * provisions above, a recipient may use your version of this file under
37
+ * either the BSD or the GPL.
38
+ */
39
+
40
+ #ifdef _WIN32
41
+
42
+ /* timeb.h is actually xsi legacy functionality */
43
+ #include <sys/timeb.h>
44
+
45
+ /* note: the comment below could not be substantiated, but what would I care */
46
+ /* MSDN says this is required to handle SIGFPE */
47
+ /* my wild guess would be that using something floating-pointy is required */
48
+ /* for the crt to do something about it */
49
+ volatile double SIGFPE_REQ = 0.0f;
50
+
51
+ static SOCKET
52
+ ev_tcp_socket (void)
53
+ {
54
+ #if EV_USE_WSASOCKET
55
+ return WSASocket (AF_INET, SOCK_STREAM, 0, 0, 0, 0);
56
+ #else
57
+ return socket (AF_INET, SOCK_STREAM, 0);
58
+ #endif
59
+ }
60
+
61
+ /* oh, the humanity! */
62
+ static int
63
+ ev_pipe (int filedes [2])
64
+ {
65
+ struct sockaddr_in addr = { 0 };
66
+ int addr_size = sizeof (addr);
67
+ struct sockaddr_in adr2;
68
+ int adr2_size = sizeof (adr2);
69
+ SOCKET listener;
70
+ SOCKET sock [2] = { -1, -1 };
71
+
72
+ if ((listener = ev_tcp_socket ()) == INVALID_SOCKET)
73
+ return -1;
74
+
75
+ addr.sin_family = AF_INET;
76
+ addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
77
+ addr.sin_port = 0;
78
+
79
+ if (bind (listener, (struct sockaddr *)&addr, addr_size))
80
+ goto fail;
81
+
82
+ if (getsockname (listener, (struct sockaddr *)&addr, &addr_size))
83
+ goto fail;
84
+
85
+ if (listen (listener, 1))
86
+ goto fail;
87
+
88
+ if ((sock [0] = ev_tcp_socket ()) == INVALID_SOCKET)
89
+ goto fail;
90
+
91
+ if (connect (sock [0], (struct sockaddr *)&addr, addr_size))
92
+ goto fail;
93
+
94
+ if ((sock [1] = accept (listener, 0, 0)) < 0)
95
+ goto fail;
96
+
97
+ /* windows vista returns fantasy port numbers for sockets:
98
+ * example for two interconnected tcp sockets:
99
+ *
100
+ * (Socket::unpack_sockaddr_in getsockname $sock0)[0] == 53364
101
+ * (Socket::unpack_sockaddr_in getpeername $sock0)[0] == 53363
102
+ * (Socket::unpack_sockaddr_in getsockname $sock1)[0] == 53363
103
+ * (Socket::unpack_sockaddr_in getpeername $sock1)[0] == 53365
104
+ *
105
+ * wow! tridirectional sockets!
106
+ *
107
+ * this way of checking ports seems to work:
108
+ */
109
+ if (getpeername (sock [0], (struct sockaddr *)&addr, &addr_size))
110
+ goto fail;
111
+
112
+ if (getsockname (sock [1], (struct sockaddr *)&adr2, &adr2_size))
113
+ goto fail;
114
+
115
+ errno = WSAEINVAL;
116
+ if (addr_size != adr2_size
117
+ || addr.sin_addr.s_addr != adr2.sin_addr.s_addr /* just to be sure, I mean, it's windows */
118
+ || addr.sin_port != adr2.sin_port)
119
+ goto fail;
120
+
121
+ closesocket (listener);
122
+
123
+ #if EV_SELECT_IS_WINSOCKET
124
+ filedes [0] = EV_WIN32_HANDLE_TO_FD (sock [0]);
125
+ filedes [1] = EV_WIN32_HANDLE_TO_FD (sock [1]);
126
+ #else
127
+ /* when select isn't winsocket, we also expect socket, connect, accept etc.
128
+ * to work on fds */
129
+ filedes [0] = sock [0];
130
+ filedes [1] = sock [1];
131
+ #endif
132
+
133
+ return 0;
134
+
135
+ fail:
136
+ closesocket (listener);
137
+
138
+ if (sock [0] != INVALID_SOCKET) closesocket (sock [0]);
139
+ if (sock [1] != INVALID_SOCKET) closesocket (sock [1]);
140
+
141
+ return -1;
142
+ }
143
+
144
+ #undef pipe
145
+ #define pipe(filedes) ev_pipe (filedes)
146
+
147
+ #define EV_HAVE_EV_TIME 1
148
+ ev_tstamp
149
+ ev_time (void)
150
+ {
151
+ FILETIME ft;
152
+ ULARGE_INTEGER ui;
153
+
154
+ GetSystemTimeAsFileTime (&ft);
155
+ ui.u.LowPart = ft.dwLowDateTime;
156
+ ui.u.HighPart = ft.dwHighDateTime;
157
+
158
+ /* msvc cannot convert ulonglong to double... yes, it is that sucky */
159
+ return (LONGLONG)(ui.QuadPart - 116444736000000000) * 1e-7;
160
+ }
161
+
162
+ #endif
163
+
@@ -0,0 +1,200 @@
1
+ /* DO NOT EDIT, automatically generated by update_ev_wrap */
2
+ #ifndef EV_WRAP_H
3
+ #define EV_WRAP_H
4
+ #define acquire_cb ((loop)->acquire_cb)
5
+ #define activecnt ((loop)->activecnt)
6
+ #define anfdmax ((loop)->anfdmax)
7
+ #define anfds ((loop)->anfds)
8
+ #define async_pending ((loop)->async_pending)
9
+ #define asynccnt ((loop)->asynccnt)
10
+ #define asyncmax ((loop)->asyncmax)
11
+ #define asyncs ((loop)->asyncs)
12
+ #define backend ((loop)->backend)
13
+ #define backend_fd ((loop)->backend_fd)
14
+ #define backend_mintime ((loop)->backend_mintime)
15
+ #define backend_modify ((loop)->backend_modify)
16
+ #define backend_poll ((loop)->backend_poll)
17
+ #define checkcnt ((loop)->checkcnt)
18
+ #define checkmax ((loop)->checkmax)
19
+ #define checks ((loop)->checks)
20
+ #define cleanupcnt ((loop)->cleanupcnt)
21
+ #define cleanupmax ((loop)->cleanupmax)
22
+ #define cleanups ((loop)->cleanups)
23
+ #define curpid ((loop)->curpid)
24
+ #define epoll_epermcnt ((loop)->epoll_epermcnt)
25
+ #define epoll_epermmax ((loop)->epoll_epermmax)
26
+ #define epoll_eperms ((loop)->epoll_eperms)
27
+ #define epoll_eventmax ((loop)->epoll_eventmax)
28
+ #define epoll_events ((loop)->epoll_events)
29
+ #define evpipe ((loop)->evpipe)
30
+ #define fdchangecnt ((loop)->fdchangecnt)
31
+ #define fdchangemax ((loop)->fdchangemax)
32
+ #define fdchanges ((loop)->fdchanges)
33
+ #define forkcnt ((loop)->forkcnt)
34
+ #define forkmax ((loop)->forkmax)
35
+ #define forks ((loop)->forks)
36
+ #define fs_2625 ((loop)->fs_2625)
37
+ #define fs_fd ((loop)->fs_fd)
38
+ #define fs_hash ((loop)->fs_hash)
39
+ #define fs_w ((loop)->fs_w)
40
+ #define idleall ((loop)->idleall)
41
+ #define idlecnt ((loop)->idlecnt)
42
+ #define idlemax ((loop)->idlemax)
43
+ #define idles ((loop)->idles)
44
+ #define invoke_cb ((loop)->invoke_cb)
45
+ #define io_blocktime ((loop)->io_blocktime)
46
+ #define iocp ((loop)->iocp)
47
+ #define kqueue_changecnt ((loop)->kqueue_changecnt)
48
+ #define kqueue_changemax ((loop)->kqueue_changemax)
49
+ #define kqueue_changes ((loop)->kqueue_changes)
50
+ #define kqueue_eventmax ((loop)->kqueue_eventmax)
51
+ #define kqueue_events ((loop)->kqueue_events)
52
+ #define kqueue_fd_pid ((loop)->kqueue_fd_pid)
53
+ #define loop_count ((loop)->loop_count)
54
+ #define loop_depth ((loop)->loop_depth)
55
+ #define loop_done ((loop)->loop_done)
56
+ #define mn_now ((loop)->mn_now)
57
+ #define now_floor ((loop)->now_floor)
58
+ #define origflags ((loop)->origflags)
59
+ #define pending_w ((loop)->pending_w)
60
+ #define pendingcnt ((loop)->pendingcnt)
61
+ #define pendingmax ((loop)->pendingmax)
62
+ #define pendingpri ((loop)->pendingpri)
63
+ #define pendings ((loop)->pendings)
64
+ #define periodiccnt ((loop)->periodiccnt)
65
+ #define periodicmax ((loop)->periodicmax)
66
+ #define periodics ((loop)->periodics)
67
+ #define pipe_w ((loop)->pipe_w)
68
+ #define pipe_write_skipped ((loop)->pipe_write_skipped)
69
+ #define pipe_write_wanted ((loop)->pipe_write_wanted)
70
+ #define pollcnt ((loop)->pollcnt)
71
+ #define pollidxmax ((loop)->pollidxmax)
72
+ #define pollidxs ((loop)->pollidxs)
73
+ #define pollmax ((loop)->pollmax)
74
+ #define polls ((loop)->polls)
75
+ #define port_eventmax ((loop)->port_eventmax)
76
+ #define port_events ((loop)->port_events)
77
+ #define postfork ((loop)->postfork)
78
+ #define preparecnt ((loop)->preparecnt)
79
+ #define preparemax ((loop)->preparemax)
80
+ #define prepares ((loop)->prepares)
81
+ #define release_cb ((loop)->release_cb)
82
+ #define rfeedcnt ((loop)->rfeedcnt)
83
+ #define rfeedmax ((loop)->rfeedmax)
84
+ #define rfeeds ((loop)->rfeeds)
85
+ #define rtmn_diff ((loop)->rtmn_diff)
86
+ #define sig_pending ((loop)->sig_pending)
87
+ #define sigfd ((loop)->sigfd)
88
+ #define sigfd_set ((loop)->sigfd_set)
89
+ #define sigfd_w ((loop)->sigfd_w)
90
+ #define timeout_blocktime ((loop)->timeout_blocktime)
91
+ #define timercnt ((loop)->timercnt)
92
+ #define timermax ((loop)->timermax)
93
+ #define timers ((loop)->timers)
94
+ #define userdata ((loop)->userdata)
95
+ #define vec_eo ((loop)->vec_eo)
96
+ #define vec_max ((loop)->vec_max)
97
+ #define vec_ri ((loop)->vec_ri)
98
+ #define vec_ro ((loop)->vec_ro)
99
+ #define vec_wi ((loop)->vec_wi)
100
+ #define vec_wo ((loop)->vec_wo)
101
+ #else
102
+ #undef EV_WRAP_H
103
+ #undef acquire_cb
104
+ #undef activecnt
105
+ #undef anfdmax
106
+ #undef anfds
107
+ #undef async_pending
108
+ #undef asynccnt
109
+ #undef asyncmax
110
+ #undef asyncs
111
+ #undef backend
112
+ #undef backend_fd
113
+ #undef backend_mintime
114
+ #undef backend_modify
115
+ #undef backend_poll
116
+ #undef checkcnt
117
+ #undef checkmax
118
+ #undef checks
119
+ #undef cleanupcnt
120
+ #undef cleanupmax
121
+ #undef cleanups
122
+ #undef curpid
123
+ #undef epoll_epermcnt
124
+ #undef epoll_epermmax
125
+ #undef epoll_eperms
126
+ #undef epoll_eventmax
127
+ #undef epoll_events
128
+ #undef evpipe
129
+ #undef fdchangecnt
130
+ #undef fdchangemax
131
+ #undef fdchanges
132
+ #undef forkcnt
133
+ #undef forkmax
134
+ #undef forks
135
+ #undef fs_2625
136
+ #undef fs_fd
137
+ #undef fs_hash
138
+ #undef fs_w
139
+ #undef idleall
140
+ #undef idlecnt
141
+ #undef idlemax
142
+ #undef idles
143
+ #undef invoke_cb
144
+ #undef io_blocktime
145
+ #undef iocp
146
+ #undef kqueue_changecnt
147
+ #undef kqueue_changemax
148
+ #undef kqueue_changes
149
+ #undef kqueue_eventmax
150
+ #undef kqueue_events
151
+ #undef kqueue_fd_pid
152
+ #undef loop_count
153
+ #undef loop_depth
154
+ #undef loop_done
155
+ #undef mn_now
156
+ #undef now_floor
157
+ #undef origflags
158
+ #undef pending_w
159
+ #undef pendingcnt
160
+ #undef pendingmax
161
+ #undef pendingpri
162
+ #undef pendings
163
+ #undef periodiccnt
164
+ #undef periodicmax
165
+ #undef periodics
166
+ #undef pipe_w
167
+ #undef pipe_write_skipped
168
+ #undef pipe_write_wanted
169
+ #undef pollcnt
170
+ #undef pollidxmax
171
+ #undef pollidxs
172
+ #undef pollmax
173
+ #undef polls
174
+ #undef port_eventmax
175
+ #undef port_events
176
+ #undef postfork
177
+ #undef preparecnt
178
+ #undef preparemax
179
+ #undef prepares
180
+ #undef release_cb
181
+ #undef rfeedcnt
182
+ #undef rfeedmax
183
+ #undef rfeeds
184
+ #undef rtmn_diff
185
+ #undef sig_pending
186
+ #undef sigfd
187
+ #undef sigfd_set
188
+ #undef sigfd_w
189
+ #undef timeout_blocktime
190
+ #undef timercnt
191
+ #undef timermax
192
+ #undef timers
193
+ #undef userdata
194
+ #undef vec_eo
195
+ #undef vec_max
196
+ #undef vec_ri
197
+ #undef vec_ro
198
+ #undef vec_wi
199
+ #undef vec_wo
200
+ #endif