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(char, linuxaio_ringbuf_valid) |
|
|
113 | VARx(int, linuxaio_iteration) |
|
|
114 | VARx(struct aniocb **, linuxaio_iocbps) |
|
|
115 | VARx(int, linuxaio_iocbpmax) |
|
|
116 | VARx(struct iocb **, linuxaio_submits) |
|
|
117 | VARx(int, linuxaio_submitcnt) |
|
|
118 | VARx(int, linuxaio_submitmax) |
|
|
119 | VARx(ev_io, linuxaio_epoll_w) |
|
|
120 | #endif |
|
|
121 | |
112 | #if EV_USE_KQUEUE || EV_GENWRAP |
122 | #if EV_USE_KQUEUE || EV_GENWRAP |
|
|
123 | VARx(pid_t, kqueue_fd_pid) |
113 | VARx(struct kevent *, kqueue_changes) |
124 | VARx(struct kevent *, kqueue_changes) |
114 | VARx(int, kqueue_changemax) |
125 | VARx(int, kqueue_changemax) |
115 | VARx(int, kqueue_changecnt) |
126 | VARx(int, kqueue_changecnt) |
116 | VARx(struct kevent *, kqueue_events) |
127 | VARx(struct kevent *, kqueue_events) |
117 | VARx(int, kqueue_eventmax) |
128 | VARx(int, kqueue_eventmax) |
… | |
… | |
180 | VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ |
191 | 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]) |
192 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
182 | #endif |
193 | #endif |
183 | |
194 | |
184 | VARx(EV_ATOMIC_T, sig_pending) |
195 | VARx(EV_ATOMIC_T, sig_pending) |
185 | VARx(int, nosigmask) |
|
|
186 | #if EV_USE_SIGNALFD || EV_GENWRAP |
196 | #if EV_USE_SIGNALFD || EV_GENWRAP |
187 | VARx(int, sigfd) |
197 | VARx(int, sigfd) |
188 | VARx(ev_io, sigfd_w) |
198 | VARx(ev_io, sigfd_w) |
189 | VARx(sigset_t, sigfd_set) |
199 | VARx(sigset_t, sigfd_set) |
190 | #endif |
200 | #endif |
… | |
… | |
194 | #if EV_FEATURE_API || EV_GENWRAP |
204 | #if EV_FEATURE_API || EV_GENWRAP |
195 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
205 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
196 | VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ |
206 | VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ |
197 | |
207 | |
198 | VARx(void *, userdata) |
208 | VARx(void *, userdata) |
|
|
209 | /* C++ doesn't support the ev_loop_callback typedef here. stinks. */ |
199 | VAR (release_cb, void (*release_cb)(EV_P)) |
210 | VAR (release_cb, void (*release_cb)(EV_P) EV_NOEXCEPT) |
200 | VAR (acquire_cb, void (*acquire_cb)(EV_P)) |
211 | VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_NOEXCEPT) |
201 | VAR (invoke_cb , void (*invoke_cb) (EV_P)) |
212 | VAR (invoke_cb , ev_loop_callback invoke_cb) |
202 | #endif |
213 | #endif |
203 | |
214 | |
204 | #undef VARx |
215 | #undef VARx |
205 | |
216 | |