cool.io 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -1
- data/CHANGES.md +4 -2
- data/Gemfile +1 -1
- data/README.md +2 -1
- data/Rakefile +22 -3
- data/cool.io.gemspec +6 -8
- data/ext/cool.io/extconf.rb +2 -1
- data/ext/cool.io/stat_watcher.c +2 -0
- data/ext/iobuffer/extconf.rb +9 -0
- data/ext/iobuffer/iobuffer.c +765 -0
- data/ext/libev/ev.c +1186 -296
- data/ext/libev/ev.h +123 -107
- data/ext/libev/ev_epoll.c +23 -10
- data/ext/libev/ev_kqueue.c +23 -7
- data/ext/libev/ev_poll.c +4 -4
- data/ext/libev/ev_port.c +9 -3
- data/ext/libev/ev_select.c +10 -6
- data/ext/libev/ev_vars.h +18 -18
- data/ext/libev/ev_win32.c +12 -2
- data/ext/libev/ev_wrap.h +164 -160
- data/lib/cool.io.rb +4 -4
- data/lib/cool.io/custom_require.rb +9 -0
- data/lib/cool.io/dns_resolver.rb +8 -5
- data/lib/cool.io/http_client.rb +4 -3
- data/lib/cool.io/listener.rb +3 -9
- data/lib/cool.io/server.rb +1 -2
- data/lib/cool.io/version.rb +1 -1
- data/spec/async_watcher_spec.rb +1 -1
- data/spec/spec_helper.rb +8 -1
- data/spec/unix_listener_spec.rb +1 -1
- data/spec/unix_server_spec.rb +2 -4
- metadata +35 -29
- checksums.yaml +0 -7
data/ext/libev/ev_kqueue.c
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* libev kqueue backend
|
3
3
|
*
|
4
|
-
* Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev@schmorp.de>
|
4
|
+
* Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev@schmorp.de>
|
5
5
|
* All rights reserved.
|
6
6
|
*
|
7
7
|
* Redistribution and use in source and binary forms, with or without modifica-
|
@@ -155,15 +155,16 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
|
|
155
155
|
int inline_size
|
156
156
|
kqueue_init (EV_P_ int flags)
|
157
157
|
{
|
158
|
-
/*
|
158
|
+
/* initialize the kernel queue */
|
159
|
+
kqueue_fd_pid = getpid ();
|
159
160
|
if ((backend_fd = kqueue ()) < 0)
|
160
161
|
return 0;
|
161
162
|
|
162
163
|
fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */
|
163
164
|
|
164
|
-
|
165
|
-
backend_modify
|
166
|
-
backend_poll
|
165
|
+
backend_mintime = 1e-9; /* apparently, they did the right thing in freebsd */
|
166
|
+
backend_modify = kqueue_modify;
|
167
|
+
backend_poll = kqueue_poll;
|
167
168
|
|
168
169
|
kqueue_eventmax = 64; /* initial number of events receivable per poll */
|
169
170
|
kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax);
|
@@ -185,8 +186,20 @@ kqueue_destroy (EV_P)
|
|
185
186
|
void inline_size
|
186
187
|
kqueue_fork (EV_P)
|
187
188
|
{
|
188
|
-
|
189
|
-
|
189
|
+
/* some BSD kernels don't just destroy the kqueue itself,
|
190
|
+
* but also close the fd, which isn't documented, and
|
191
|
+
* impossible to support properly.
|
192
|
+
* we remember the pid of the kqueue call and only close
|
193
|
+
* the fd if the pid is still the same.
|
194
|
+
* this leaks fds on sane kernels, but BSD interfaces are
|
195
|
+
* notoriously buggy and rarely get fixed.
|
196
|
+
*/
|
197
|
+
pid_t newpid = getpid ();
|
198
|
+
|
199
|
+
if (newpid == kqueue_fd_pid)
|
200
|
+
close (backend_fd);
|
201
|
+
|
202
|
+
kqueue_fd_pid = newpid;
|
190
203
|
while ((backend_fd = kqueue ()) < 0)
|
191
204
|
ev_syserr ("(libev) kqueue");
|
192
205
|
|
@@ -196,3 +209,6 @@ kqueue_fork (EV_P)
|
|
196
209
|
fd_rearm_all (EV_A);
|
197
210
|
}
|
198
211
|
|
212
|
+
/* sys/event.h defines EV_ERROR */
|
213
|
+
#undef EV_ERROR
|
214
|
+
|
data/ext/libev/ev_poll.c
CHANGED
@@ -92,7 +92,7 @@ poll_poll (EV_P_ ev_tstamp timeout)
|
|
92
92
|
int res;
|
93
93
|
|
94
94
|
EV_RELEASE_CB;
|
95
|
-
res = poll (polls, pollcnt,
|
95
|
+
res = poll (polls, pollcnt, timeout * 1e3);
|
96
96
|
EV_ACQUIRE_CB;
|
97
97
|
|
98
98
|
if (expect_false (res < 0))
|
@@ -129,9 +129,9 @@ poll_poll (EV_P_ ev_tstamp timeout)
|
|
129
129
|
int inline_size
|
130
130
|
poll_init (EV_P_ int flags)
|
131
131
|
{
|
132
|
-
|
133
|
-
backend_modify
|
134
|
-
backend_poll
|
132
|
+
backend_mintime = 1e-3;
|
133
|
+
backend_modify = poll_modify;
|
134
|
+
backend_poll = poll_poll;
|
135
135
|
|
136
136
|
pollidxs = 0; pollidxmax = 0;
|
137
137
|
polls = 0; pollmax = 0; pollcnt = 0;
|
data/ext/libev/ev_port.c
CHANGED
@@ -147,9 +147,15 @@ port_init (EV_P_ int flags)
|
|
147
147
|
|
148
148
|
fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */
|
149
149
|
|
150
|
-
|
151
|
-
|
152
|
-
|
150
|
+
/* if my reading of the opensolaris kernel sources are correct, then
|
151
|
+
* opensolaris does something very stupid: it checks if the time has already
|
152
|
+
* elapsed and doesn't round up if that is the case,m otherwise it DOES round
|
153
|
+
* up. Since we can't know what the case is, we need to guess by using a
|
154
|
+
* "large enough" timeout. Normally, 1e-9 would be correct.
|
155
|
+
*/
|
156
|
+
backend_mintime = 1e-3; /* needed to compensate for port_getn returning early */
|
157
|
+
backend_modify = port_modify;
|
158
|
+
backend_poll = port_poll;
|
153
159
|
|
154
160
|
port_eventmax = 64; /* initial number of events receivable per poll */
|
155
161
|
port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax);
|
data/ext/libev/ev_select.c
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* libev select fd activity backend
|
3
3
|
*
|
4
|
-
* Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev@schmorp.de>
|
4
|
+
* Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
|
5
5
|
* All rights reserved.
|
6
6
|
*
|
7
7
|
* Redistribution and use in source and binary forms, with or without modifica-
|
@@ -195,7 +195,12 @@ select_poll (EV_P_ ev_tstamp timeout)
|
|
195
195
|
*/
|
196
196
|
if (errno == EINVAL)
|
197
197
|
{
|
198
|
-
|
198
|
+
if (timeout)
|
199
|
+
{
|
200
|
+
unsigned long ms = timeout * 1e3;
|
201
|
+
Sleep (ms ? ms : 1);
|
202
|
+
}
|
203
|
+
|
199
204
|
return;
|
200
205
|
}
|
201
206
|
#endif
|
@@ -269,9 +274,9 @@ select_poll (EV_P_ ev_tstamp timeout)
|
|
269
274
|
int inline_size
|
270
275
|
select_init (EV_P_ int flags)
|
271
276
|
{
|
272
|
-
|
273
|
-
backend_modify
|
274
|
-
backend_poll
|
277
|
+
backend_mintime = 1e-6;
|
278
|
+
backend_modify = select_modify;
|
279
|
+
backend_poll = select_poll;
|
275
280
|
|
276
281
|
#if EV_SELECT_USE_FD_SET
|
277
282
|
vec_ri = ev_malloc (sizeof (fd_set)); FD_ZERO ((fd_set *)vec_ri);
|
@@ -307,4 +312,3 @@ select_destroy (EV_P)
|
|
307
312
|
#endif
|
308
313
|
}
|
309
314
|
|
310
|
-
|
data/ext/libev/ev_vars.h
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* loop member variable declarations
|
3
3
|
*
|
4
|
-
* Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
|
4
|
+
* Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev@schmorp.de>
|
5
5
|
* All rights reserved.
|
6
6
|
*
|
7
7
|
* Redistribution and use in source and binary forms, with or without modifica-
|
@@ -43,6 +43,17 @@ VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */
|
|
43
43
|
VARx(ev_tstamp, mn_now) /* monotonic clock "now" */
|
44
44
|
VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */
|
45
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
|
+
|
46
57
|
VARx(ev_tstamp, io_blocktime)
|
47
58
|
VARx(ev_tstamp, timeout_blocktime)
|
48
59
|
|
@@ -51,28 +62,17 @@ VARx(int, activecnt) /* total number of active events ("refcount") */
|
|
51
62
|
VARx(EV_ATOMIC_T, loop_done) /* signal by ev_break */
|
52
63
|
|
53
64
|
VARx(int, backend_fd)
|
54
|
-
VARx(ev_tstamp,
|
65
|
+
VARx(ev_tstamp, backend_mintime) /* assumed typical timer resolution */
|
55
66
|
VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev))
|
56
67
|
VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout))
|
57
68
|
|
58
69
|
VARx(ANFD *, anfds)
|
59
70
|
VARx(int, anfdmax)
|
60
71
|
|
61
|
-
VAR (pendings, ANPENDING *pendings [NUMPRI])
|
62
|
-
VAR (pendingmax, int pendingmax [NUMPRI])
|
63
|
-
VAR (pendingcnt, int pendingcnt [NUMPRI])
|
64
|
-
VARx(ev_prepare, pending_w) /* dummy pending watcher */
|
65
|
-
|
66
|
-
/* for reverse feeding of events */
|
67
|
-
VARx(W *, rfeeds)
|
68
|
-
VARx(int, rfeedmax)
|
69
|
-
VARx(int, rfeedcnt)
|
70
|
-
|
71
|
-
#if EV_USE_EVENTFD || EV_GENWRAP
|
72
|
-
VARx(int, evfd)
|
73
|
-
#endif
|
74
72
|
VAR (evpipe, int evpipe [2])
|
75
73
|
VARx(ev_io, pipe_w)
|
74
|
+
VARx(EV_ATOMIC_T, pipe_write_wanted)
|
75
|
+
VARx(EV_ATOMIC_T, pipe_write_skipped)
|
76
76
|
|
77
77
|
#if !defined(_WIN32) || EV_GENWRAP
|
78
78
|
VARx(pid_t, curpid)
|
@@ -108,6 +108,7 @@ VARx(int, epoll_epermmax)
|
|
108
108
|
#endif
|
109
109
|
|
110
110
|
#if EV_USE_KQUEUE || EV_GENWRAP
|
111
|
+
VARx(pid_t, kqueue_fd_pid)
|
111
112
|
VARx(struct kevent *, kqueue_changes)
|
112
113
|
VARx(int, kqueue_changemax)
|
113
114
|
VARx(int, kqueue_changecnt)
|
@@ -180,7 +181,6 @@ VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE])
|
|
180
181
|
#endif
|
181
182
|
|
182
183
|
VARx(EV_ATOMIC_T, sig_pending)
|
183
|
-
VARx(int, nosigmask)
|
184
184
|
#if EV_USE_SIGNALFD || EV_GENWRAP
|
185
185
|
VARx(int, sigfd)
|
186
186
|
VARx(ev_io, sigfd_w)
|
@@ -194,8 +194,8 @@ VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */
|
|
194
194
|
VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */
|
195
195
|
|
196
196
|
VARx(void *, userdata)
|
197
|
-
VAR (release_cb, void (*release_cb)(EV_P))
|
198
|
-
VAR (acquire_cb, void (*acquire_cb)(EV_P))
|
197
|
+
VAR (release_cb, void (*release_cb)(EV_P) EV_THROW)
|
198
|
+
VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_THROW)
|
199
199
|
VAR (invoke_cb , void (*invoke_cb) (EV_P))
|
200
200
|
#endif
|
201
201
|
|
data/ext/libev/ev_win32.c
CHANGED
@@ -48,6 +48,16 @@
|
|
48
48
|
/* for the crt to do something about it */
|
49
49
|
volatile double SIGFPE_REQ = 0.0f;
|
50
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
|
+
|
51
61
|
/* oh, the humanity! */
|
52
62
|
static int
|
53
63
|
ev_pipe (int filedes [2])
|
@@ -59,7 +69,7 @@ ev_pipe (int filedes [2])
|
|
59
69
|
SOCKET listener;
|
60
70
|
SOCKET sock [2] = { -1, -1 };
|
61
71
|
|
62
|
-
if ((listener =
|
72
|
+
if ((listener = ev_tcp_socket ()) == INVALID_SOCKET)
|
63
73
|
return -1;
|
64
74
|
|
65
75
|
addr.sin_family = AF_INET;
|
@@ -75,7 +85,7 @@ ev_pipe (int filedes [2])
|
|
75
85
|
if (listen (listener, 1))
|
76
86
|
goto fail;
|
77
87
|
|
78
|
-
if ((sock [0] =
|
88
|
+
if ((sock [0] = ev_tcp_socket ()) == INVALID_SOCKET)
|
79
89
|
goto fail;
|
80
90
|
|
81
91
|
if (connect (sock [0], (struct sockaddr *)&addr, addr_size))
|
data/ext/libev/ev_wrap.h
CHANGED
@@ -1,196 +1,200 @@
|
|
1
1
|
/* DO NOT EDIT, automatically generated by update_ev_wrap */
|
2
2
|
#ifndef EV_WRAP_H
|
3
3
|
#define EV_WRAP_H
|
4
|
-
#define
|
5
|
-
#define mn_now ((loop)->mn_now)
|
6
|
-
#define rtmn_diff ((loop)->rtmn_diff)
|
7
|
-
#define io_blocktime ((loop)->io_blocktime)
|
8
|
-
#define timeout_blocktime ((loop)->timeout_blocktime)
|
9
|
-
#define backend ((loop)->backend)
|
4
|
+
#define acquire_cb ((loop)->acquire_cb)
|
10
5
|
#define activecnt ((loop)->activecnt)
|
11
|
-
#define
|
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)
|
12
13
|
#define backend_fd ((loop)->backend_fd)
|
13
|
-
#define
|
14
|
+
#define backend_mintime ((loop)->backend_mintime)
|
14
15
|
#define backend_modify ((loop)->backend_modify)
|
15
16
|
#define backend_poll ((loop)->backend_poll)
|
16
|
-
#define
|
17
|
-
#define
|
18
|
-
#define
|
19
|
-
#define
|
20
|
-
#define
|
21
|
-
#define
|
22
|
-
#define rfeeds ((loop)->rfeeds)
|
23
|
-
#define rfeedmax ((loop)->rfeedmax)
|
24
|
-
#define rfeedcnt ((loop)->rfeedcnt)
|
25
|
-
#define evfd ((loop)->evfd)
|
26
|
-
#define evpipe ((loop)->evpipe)
|
27
|
-
#define pipe_w ((loop)->pipe_w)
|
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)
|
28
23
|
#define curpid ((loop)->curpid)
|
29
|
-
#define postfork ((loop)->postfork)
|
30
|
-
#define vec_ri ((loop)->vec_ri)
|
31
|
-
#define vec_ro ((loop)->vec_ro)
|
32
|
-
#define vec_wi ((loop)->vec_wi)
|
33
|
-
#define vec_wo ((loop)->vec_wo)
|
34
|
-
#define vec_eo ((loop)->vec_eo)
|
35
|
-
#define vec_max ((loop)->vec_max)
|
36
|
-
#define polls ((loop)->polls)
|
37
|
-
#define pollmax ((loop)->pollmax)
|
38
|
-
#define pollcnt ((loop)->pollcnt)
|
39
|
-
#define pollidxs ((loop)->pollidxs)
|
40
|
-
#define pollidxmax ((loop)->pollidxmax)
|
41
|
-
#define epoll_events ((loop)->epoll_events)
|
42
|
-
#define epoll_eventmax ((loop)->epoll_eventmax)
|
43
|
-
#define epoll_eperms ((loop)->epoll_eperms)
|
44
24
|
#define epoll_epermcnt ((loop)->epoll_epermcnt)
|
45
25
|
#define epoll_epermmax ((loop)->epoll_epermmax)
|
46
|
-
#define
|
47
|
-
#define
|
48
|
-
#define
|
49
|
-
#define
|
50
|
-
#define kqueue_eventmax ((loop)->kqueue_eventmax)
|
51
|
-
#define port_events ((loop)->port_events)
|
52
|
-
#define port_eventmax ((loop)->port_eventmax)
|
53
|
-
#define iocp ((loop)->iocp)
|
54
|
-
#define fdchanges ((loop)->fdchanges)
|
55
|
-
#define fdchangemax ((loop)->fdchangemax)
|
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)
|
56
30
|
#define fdchangecnt ((loop)->fdchangecnt)
|
57
|
-
#define
|
58
|
-
#define
|
59
|
-
#define timercnt ((loop)->timercnt)
|
60
|
-
#define periodics ((loop)->periodics)
|
61
|
-
#define periodicmax ((loop)->periodicmax)
|
62
|
-
#define periodiccnt ((loop)->periodiccnt)
|
63
|
-
#define idles ((loop)->idles)
|
64
|
-
#define idlemax ((loop)->idlemax)
|
65
|
-
#define idlecnt ((loop)->idlecnt)
|
66
|
-
#define idleall ((loop)->idleall)
|
67
|
-
#define prepares ((loop)->prepares)
|
68
|
-
#define preparemax ((loop)->preparemax)
|
69
|
-
#define preparecnt ((loop)->preparecnt)
|
70
|
-
#define checks ((loop)->checks)
|
71
|
-
#define checkmax ((loop)->checkmax)
|
72
|
-
#define checkcnt ((loop)->checkcnt)
|
73
|
-
#define forks ((loop)->forks)
|
74
|
-
#define forkmax ((loop)->forkmax)
|
31
|
+
#define fdchangemax ((loop)->fdchangemax)
|
32
|
+
#define fdchanges ((loop)->fdchanges)
|
75
33
|
#define forkcnt ((loop)->forkcnt)
|
76
|
-
#define
|
77
|
-
#define
|
78
|
-
#define cleanupcnt ((loop)->cleanupcnt)
|
79
|
-
#define async_pending ((loop)->async_pending)
|
80
|
-
#define asyncs ((loop)->asyncs)
|
81
|
-
#define asyncmax ((loop)->asyncmax)
|
82
|
-
#define asynccnt ((loop)->asynccnt)
|
83
|
-
#define fs_fd ((loop)->fs_fd)
|
84
|
-
#define fs_w ((loop)->fs_w)
|
34
|
+
#define forkmax ((loop)->forkmax)
|
35
|
+
#define forks ((loop)->forks)
|
85
36
|
#define fs_2625 ((loop)->fs_2625)
|
37
|
+
#define fs_fd ((loop)->fs_fd)
|
86
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)
|
87
86
|
#define sig_pending ((loop)->sig_pending)
|
88
|
-
#define nosigmask ((loop)->nosigmask)
|
89
87
|
#define sigfd ((loop)->sigfd)
|
90
|
-
#define sigfd_w ((loop)->sigfd_w)
|
91
88
|
#define sigfd_set ((loop)->sigfd_set)
|
92
|
-
#define
|
93
|
-
#define
|
94
|
-
#define
|
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)
|
95
94
|
#define userdata ((loop)->userdata)
|
96
|
-
#define
|
97
|
-
#define
|
98
|
-
#define
|
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)
|
99
101
|
#else
|
100
102
|
#undef EV_WRAP_H
|
101
|
-
#undef
|
102
|
-
#undef mn_now
|
103
|
-
#undef rtmn_diff
|
104
|
-
#undef io_blocktime
|
105
|
-
#undef timeout_blocktime
|
106
|
-
#undef backend
|
103
|
+
#undef acquire_cb
|
107
104
|
#undef activecnt
|
108
|
-
#undef
|
105
|
+
#undef anfdmax
|
106
|
+
#undef anfds
|
107
|
+
#undef async_pending
|
108
|
+
#undef asynccnt
|
109
|
+
#undef asyncmax
|
110
|
+
#undef asyncs
|
111
|
+
#undef backend
|
109
112
|
#undef backend_fd
|
110
|
-
#undef
|
113
|
+
#undef backend_mintime
|
111
114
|
#undef backend_modify
|
112
115
|
#undef backend_poll
|
113
|
-
#undef
|
114
|
-
#undef
|
115
|
-
#undef
|
116
|
-
#undef
|
117
|
-
#undef
|
118
|
-
#undef
|
119
|
-
#undef rfeeds
|
120
|
-
#undef rfeedmax
|
121
|
-
#undef rfeedcnt
|
122
|
-
#undef evfd
|
123
|
-
#undef evpipe
|
124
|
-
#undef pipe_w
|
116
|
+
#undef checkcnt
|
117
|
+
#undef checkmax
|
118
|
+
#undef checks
|
119
|
+
#undef cleanupcnt
|
120
|
+
#undef cleanupmax
|
121
|
+
#undef cleanups
|
125
122
|
#undef curpid
|
126
|
-
#undef postfork
|
127
|
-
#undef vec_ri
|
128
|
-
#undef vec_ro
|
129
|
-
#undef vec_wi
|
130
|
-
#undef vec_wo
|
131
|
-
#undef vec_eo
|
132
|
-
#undef vec_max
|
133
|
-
#undef polls
|
134
|
-
#undef pollmax
|
135
|
-
#undef pollcnt
|
136
|
-
#undef pollidxs
|
137
|
-
#undef pollidxmax
|
138
|
-
#undef epoll_events
|
139
|
-
#undef epoll_eventmax
|
140
|
-
#undef epoll_eperms
|
141
123
|
#undef epoll_epermcnt
|
142
124
|
#undef epoll_epermmax
|
143
|
-
#undef
|
144
|
-
#undef
|
145
|
-
#undef
|
146
|
-
#undef
|
147
|
-
#undef kqueue_eventmax
|
148
|
-
#undef port_events
|
149
|
-
#undef port_eventmax
|
150
|
-
#undef iocp
|
151
|
-
#undef fdchanges
|
152
|
-
#undef fdchangemax
|
125
|
+
#undef epoll_eperms
|
126
|
+
#undef epoll_eventmax
|
127
|
+
#undef epoll_events
|
128
|
+
#undef evpipe
|
153
129
|
#undef fdchangecnt
|
154
|
-
#undef
|
155
|
-
#undef
|
156
|
-
#undef timercnt
|
157
|
-
#undef periodics
|
158
|
-
#undef periodicmax
|
159
|
-
#undef periodiccnt
|
160
|
-
#undef idles
|
161
|
-
#undef idlemax
|
162
|
-
#undef idlecnt
|
163
|
-
#undef idleall
|
164
|
-
#undef prepares
|
165
|
-
#undef preparemax
|
166
|
-
#undef preparecnt
|
167
|
-
#undef checks
|
168
|
-
#undef checkmax
|
169
|
-
#undef checkcnt
|
170
|
-
#undef forks
|
171
|
-
#undef forkmax
|
130
|
+
#undef fdchangemax
|
131
|
+
#undef fdchanges
|
172
132
|
#undef forkcnt
|
173
|
-
#undef
|
174
|
-
#undef
|
175
|
-
#undef cleanupcnt
|
176
|
-
#undef async_pending
|
177
|
-
#undef asyncs
|
178
|
-
#undef asyncmax
|
179
|
-
#undef asynccnt
|
180
|
-
#undef fs_fd
|
181
|
-
#undef fs_w
|
133
|
+
#undef forkmax
|
134
|
+
#undef forks
|
182
135
|
#undef fs_2625
|
136
|
+
#undef fs_fd
|
183
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
|
184
185
|
#undef sig_pending
|
185
|
-
#undef nosigmask
|
186
186
|
#undef sigfd
|
187
|
-
#undef sigfd_w
|
188
187
|
#undef sigfd_set
|
189
|
-
#undef
|
190
|
-
#undef
|
191
|
-
#undef
|
188
|
+
#undef sigfd_w
|
189
|
+
#undef timeout_blocktime
|
190
|
+
#undef timercnt
|
191
|
+
#undef timermax
|
192
|
+
#undef timers
|
192
193
|
#undef userdata
|
193
|
-
#undef
|
194
|
-
#undef
|
195
|
-
#undef
|
194
|
+
#undef vec_eo
|
195
|
+
#undef vec_max
|
196
|
+
#undef vec_ri
|
197
|
+
#undef vec_ro
|
198
|
+
#undef vec_wi
|
199
|
+
#undef vec_wo
|
196
200
|
#endif
|