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) |
|
|
74 | VARx(EV_ATOMIC_T, pipe_write_wanted) |
|
|
75 | VARx(EV_ATOMIC_T, pipe_write_skipped) |
76 | |
76 | |
77 | #if !defined(_WIN32) || EV_GENWRAP |
77 | #if !defined(_WIN32) || EV_GENWRAP |
78 | VARx(pid_t, curpid) |
78 | VARx(pid_t, curpid) |
79 | #endif |
79 | #endif |
80 | |
80 | |
… | |
… | |
105 | VARx(int *, epoll_eperms) |
105 | VARx(int *, epoll_eperms) |
106 | VARx(int, epoll_epermcnt) |
106 | VARx(int, epoll_epermcnt) |
107 | VARx(int, epoll_epermmax) |
107 | VARx(int, epoll_epermmax) |
108 | #endif |
108 | #endif |
109 | |
109 | |
|
|
110 | #if EV_USE_LINUXAIO || EV_GENWRAP |
|
|
111 | VARx(aio_context_t, linuxaio_ctx) |
|
|
112 | VARx(struct aniocb **, linuxaio_iocbps) |
|
|
113 | VARx(int, linuxaio_iocbpmax) |
|
|
114 | VARx(struct iocb **, linuxaio_submits) |
|
|
115 | VARx(int, linuxaio_submitcnt) |
|
|
116 | VARx(int, linuxaio_submitmax) |
|
|
117 | #endif |
|
|
118 | |
110 | #if EV_USE_KQUEUE || EV_GENWRAP |
119 | #if EV_USE_KQUEUE || EV_GENWRAP |
|
|
120 | VARx(pid_t, kqueue_fd_pid) |
111 | VARx(struct kevent *, kqueue_changes) |
121 | VARx(struct kevent *, kqueue_changes) |
112 | VARx(int, kqueue_changemax) |
122 | VARx(int, kqueue_changemax) |
113 | VARx(int, kqueue_changecnt) |
123 | VARx(int, kqueue_changecnt) |
114 | VARx(struct kevent *, kqueue_events) |
124 | VARx(struct kevent *, kqueue_events) |
115 | VARx(int, kqueue_eventmax) |
125 | VARx(int, kqueue_eventmax) |
… | |
… | |
178 | VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ |
188 | VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ |
179 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
189 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
180 | #endif |
190 | #endif |
181 | |
191 | |
182 | VARx(EV_ATOMIC_T, sig_pending) |
192 | VARx(EV_ATOMIC_T, sig_pending) |
183 | VARx(int, nosigmask) |
|
|
184 | #if EV_USE_SIGNALFD || EV_GENWRAP |
193 | #if EV_USE_SIGNALFD || EV_GENWRAP |
185 | VARx(int, sigfd) |
194 | VARx(int, sigfd) |
186 | VARx(ev_io, sigfd_w) |
195 | VARx(ev_io, sigfd_w) |
187 | VARx(sigset_t, sigfd_set) |
196 | VARx(sigset_t, sigfd_set) |
188 | #endif |
197 | #endif |
… | |
… | |
192 | #if EV_FEATURE_API || EV_GENWRAP |
201 | #if EV_FEATURE_API || EV_GENWRAP |
193 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
202 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
194 | VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ |
203 | VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ |
195 | |
204 | |
196 | VARx(void *, userdata) |
205 | VARx(void *, userdata) |
|
|
206 | /* C++ doesn't support the ev_loop_callback typedef here. stinks. */ |
197 | VAR (release_cb, void (*release_cb)(EV_P)) |
207 | VAR (release_cb, void (*release_cb)(EV_P) EV_NOEXCEPT) |
198 | VAR (acquire_cb, void (*acquire_cb)(EV_P)) |
208 | VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_NOEXCEPT) |
199 | VAR (invoke_cb , void (*invoke_cb) (EV_P)) |
209 | VAR (invoke_cb , ev_loop_callback invoke_cb) |
200 | #endif |
210 | #endif |
201 | |
211 | |
202 | #undef VARx |
212 | #undef VARx |
203 | |
213 | |