1 | /* |
1 | /* |
2 | * loop member variable declarations |
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,2013,2019 Marc Alexander Lehmann <libev@schmorp.de> |
5 | * All rights reserved. |
5 | * All rights reserved. |
6 | * |
6 | * |
7 | * Redistribution and use in source and binary forms, with or without modifica- |
7 | * Redistribution and use in source and binary forms, with or without modifica- |
8 | * tion, are permitted provided that the following conditions are met: |
8 | * tion, are permitted provided that the following conditions are met: |
9 | * |
9 | * |
… | |
… | |
41 | |
41 | |
42 | VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */ |
42 | VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */ |
43 | VARx(ev_tstamp, mn_now) /* monotonic clock "now" */ |
43 | VARx(ev_tstamp, mn_now) /* monotonic clock "now" */ |
44 | VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */ |
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 | VARx(ev_tstamp, io_blocktime) |
57 | VARx(ev_tstamp, io_blocktime) |
47 | VARx(ev_tstamp, timeout_blocktime) |
58 | VARx(ev_tstamp, timeout_blocktime) |
48 | |
59 | |
49 | VARx(int, backend) |
60 | VARx(int, backend) |
50 | VARx(int, activecnt) /* total number of active events ("refcount") */ |
61 | VARx(int, activecnt) /* total number of active events ("refcount") */ |
… | |
… | |
56 | VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout)) |
67 | VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout)) |
57 | |
68 | |
58 | VARx(ANFD *, anfds) |
69 | VARx(ANFD *, anfds) |
59 | VARx(int, anfdmax) |
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 | VAR (evpipe, int evpipe [2]) |
72 | VAR (evpipe, int evpipe [2]) |
75 | VARx(ev_io, pipe_w) |
73 | VARx(ev_io, pipe_w) |
76 | VARx(EV_ATOMIC_T, pipe_write_wanted) |
74 | VARx(EV_ATOMIC_T, pipe_write_wanted) |
77 | VARx(EV_ATOMIC_T, pipe_write_skipped) |
75 | VARx(EV_ATOMIC_T, pipe_write_skipped) |
78 | |
76 | |
… | |
… | |
107 | VARx(int *, epoll_eperms) |
105 | VARx(int *, epoll_eperms) |
108 | VARx(int, epoll_epermcnt) |
106 | VARx(int, epoll_epermcnt) |
109 | VARx(int, epoll_epermmax) |
107 | VARx(int, epoll_epermmax) |
110 | #endif |
108 | #endif |
111 | |
109 | |
|
|
110 | #if EV_USE_LINUXAIO || EV_GENWRAP |
|
|
111 | VARx(aio_context_t, linuxaio_ctx) |
|
|
112 | VARx(int, linuxaio_iteration) |
|
|
113 | VARx(struct aniocb **, linuxaio_iocbps) |
|
|
114 | VARx(int, linuxaio_iocbpmax) |
|
|
115 | VARx(struct iocb **, linuxaio_submits) |
|
|
116 | VARx(int, linuxaio_submitcnt) |
|
|
117 | VARx(int, linuxaio_submitmax) |
|
|
118 | VARx(ev_io, linuxaio_epoll_w) |
|
|
119 | #endif |
|
|
120 | |
|
|
121 | #if EV_USE_IOURING || EV_GENWRAP |
|
|
122 | VARx(int, iouring_fd) |
|
|
123 | VARx(unsigned, iouring_to_submit); |
|
|
124 | VARx(int, iouring_entries) |
|
|
125 | VARx(int, iouring_max_entries) |
|
|
126 | VARx(void *, iouring_ring) |
|
|
127 | VARx(void *, iouring_sqes) |
|
|
128 | VARx(uint32_t, iouring_ring_size) |
|
|
129 | VARx(uint32_t, iouring_sqes_size) |
|
|
130 | VARx(uint32_t, iouring_sq_head) |
|
|
131 | VARx(uint32_t, iouring_sq_tail) |
|
|
132 | VARx(uint32_t, iouring_sq_ring_mask) |
|
|
133 | VARx(uint32_t, iouring_sq_ring_entries) |
|
|
134 | VARx(uint32_t, iouring_sq_flags) |
|
|
135 | VARx(uint32_t, iouring_sq_dropped) |
|
|
136 | VARx(uint32_t, iouring_sq_array) |
|
|
137 | VARx(uint32_t, iouring_cq_head) |
|
|
138 | VARx(uint32_t, iouring_cq_tail) |
|
|
139 | VARx(uint32_t, iouring_cq_ring_mask) |
|
|
140 | VARx(uint32_t, iouring_cq_ring_entries) |
|
|
141 | VARx(uint32_t, iouring_cq_overflow) |
|
|
142 | VARx(uint32_t, iouring_cq_cqes) |
|
|
143 | VARx(ev_tstamp, iouring_tfd_to) |
|
|
144 | VARx(int, iouring_tfd) |
|
|
145 | VARx(ev_io, iouring_tfd_w) |
|
|
146 | #endif |
|
|
147 | |
112 | #if EV_USE_KQUEUE || EV_GENWRAP |
148 | #if EV_USE_KQUEUE || EV_GENWRAP |
|
|
149 | VARx(pid_t, kqueue_fd_pid) |
113 | VARx(struct kevent *, kqueue_changes) |
150 | VARx(struct kevent *, kqueue_changes) |
114 | VARx(int, kqueue_changemax) |
151 | VARx(int, kqueue_changemax) |
115 | VARx(int, kqueue_changecnt) |
152 | VARx(int, kqueue_changecnt) |
116 | VARx(struct kevent *, kqueue_events) |
153 | VARx(struct kevent *, kqueue_events) |
117 | VARx(int, kqueue_eventmax) |
154 | VARx(int, kqueue_eventmax) |
… | |
… | |
180 | VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ |
217 | VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ |
181 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
218 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
182 | #endif |
219 | #endif |
183 | |
220 | |
184 | VARx(EV_ATOMIC_T, sig_pending) |
221 | VARx(EV_ATOMIC_T, sig_pending) |
185 | VARx(int, nosigmask) |
|
|
186 | #if EV_USE_SIGNALFD || EV_GENWRAP |
222 | #if EV_USE_SIGNALFD || EV_GENWRAP |
187 | VARx(int, sigfd) |
223 | VARx(int, sigfd) |
188 | VARx(ev_io, sigfd_w) |
224 | VARx(ev_io, sigfd_w) |
189 | VARx(sigset_t, sigfd_set) |
225 | VARx(sigset_t, sigfd_set) |
190 | #endif |
226 | #endif |
191 | |
227 | |
|
|
228 | #if EV_USE_TIMERFD || EV_GENWRAP |
|
|
229 | VARx(int, timerfd) /* timerfd for time jump detection */ |
|
|
230 | VARx(ev_io, timerfd_w) |
|
|
231 | #endif |
|
|
232 | |
192 | VARx(unsigned int, origflags) /* original loop flags */ |
233 | VARx(unsigned int, origflags) /* original loop flags */ |
193 | |
234 | |
194 | #if EV_FEATURE_API || EV_GENWRAP |
235 | #if EV_FEATURE_API || EV_GENWRAP |
195 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
236 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
196 | VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ |
237 | VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ |
197 | |
238 | |
198 | VARx(void *, userdata) |
239 | VARx(void *, userdata) |
|
|
240 | /* C++ doesn't support the ev_loop_callback typedef here. stinks. */ |
199 | VAR (release_cb, void (*release_cb)(EV_P)) |
241 | VAR (release_cb, void (*release_cb)(EV_P) EV_NOEXCEPT) |
200 | VAR (acquire_cb, void (*acquire_cb)(EV_P)) |
242 | VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_NOEXCEPT) |
201 | VAR (invoke_cb , void (*invoke_cb) (EV_P)) |
243 | VAR (invoke_cb , ev_loop_callback invoke_cb) |
202 | #endif |
244 | #endif |
203 | |
245 | |
204 | #undef VARx |
246 | #undef VARx |
205 | |
247 | |