1 | /* |
1 | /* |
2 | * loop member variable declarations |
2 | * loop member variable declarations |
3 | * |
3 | * |
4 | * Copyright (c) 2007,2008 Marc Alexander Lehmann <libev@schmorp.de> |
4 | * Copyright (c) 2007,2008,2009,2010,2011 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 | * |
… | |
… | |
46 | VARx(ev_tstamp, io_blocktime) |
46 | VARx(ev_tstamp, io_blocktime) |
47 | VARx(ev_tstamp, timeout_blocktime) |
47 | VARx(ev_tstamp, timeout_blocktime) |
48 | |
48 | |
49 | VARx(int, backend) |
49 | VARx(int, backend) |
50 | VARx(int, activecnt) /* total number of active events ("refcount") */ |
50 | VARx(int, activecnt) /* total number of active events ("refcount") */ |
51 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
51 | VARx(EV_ATOMIC_T, loop_done) /* signal by ev_break */ |
52 | |
52 | |
53 | VARx(int, backend_fd) |
53 | VARx(int, backend_fd) |
54 | VARx(ev_tstamp, backend_fudge) /* assumed typical timer resolution */ |
54 | VARx(ev_tstamp, backend_fudge) /* assumed typical timer resolution */ |
55 | VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev)) |
55 | VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev)) |
56 | VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout)) |
56 | VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout)) |
57 | |
57 | |
|
|
58 | VARx(ANFD *, anfds) |
|
|
59 | VARx(int, anfdmax) |
|
|
60 | |
|
|
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 | |
58 | #if EV_USE_EVENTFD || EV_GENWRAP |
71 | #if EV_USE_EVENTFD || EV_GENWRAP |
59 | VARx(int, evfd) |
72 | VARx(int, evfd) |
60 | #endif |
73 | #endif |
61 | VAR (evpipe, int evpipe [2]) |
74 | VAR (evpipe, int evpipe [2]) |
62 | VARx(ev_io, pipeev) |
75 | VARx(ev_io, pipe_w) |
63 | |
76 | |
64 | #if !defined(_WIN32) || EV_GENWRAP |
77 | #if !defined(_WIN32) || EV_GENWRAP |
65 | VARx(pid_t, curpid) |
78 | VARx(pid_t, curpid) |
66 | #endif |
79 | #endif |
67 | |
80 | |
68 | VARx(int, postfork) /* true if we need to recreate kernel state after fork */ |
81 | VARx(char, postfork) /* true if we need to recreate kernel state after fork */ |
69 | |
82 | |
70 | #if EV_USE_SELECT || EV_GENWRAP |
83 | #if EV_USE_SELECT || EV_GENWRAP |
71 | VARx(void *, vec_ri) |
84 | VARx(void *, vec_ri) |
72 | VARx(void *, vec_ro) |
85 | VARx(void *, vec_ro) |
73 | VARx(void *, vec_wi) |
86 | VARx(void *, vec_wi) |
74 | VARx(void *, vec_wo) |
87 | VARx(void *, vec_wo) |
|
|
88 | #if defined(_WIN32) || EV_GENWRAP |
|
|
89 | VARx(void *, vec_eo) |
|
|
90 | #endif |
75 | VARx(int, vec_max) |
91 | VARx(int, vec_max) |
76 | #endif |
92 | #endif |
77 | |
93 | |
78 | #if EV_USE_POLL || EV_GENWRAP |
94 | #if EV_USE_POLL || EV_GENWRAP |
79 | VARx(struct pollfd *, polls) |
95 | VARx(struct pollfd *, polls) |
… | |
… | |
84 | #endif |
100 | #endif |
85 | |
101 | |
86 | #if EV_USE_EPOLL || EV_GENWRAP |
102 | #if EV_USE_EPOLL || EV_GENWRAP |
87 | VARx(struct epoll_event *, epoll_events) |
103 | VARx(struct epoll_event *, epoll_events) |
88 | VARx(int, epoll_eventmax) |
104 | VARx(int, epoll_eventmax) |
|
|
105 | VARx(int *, epoll_eperms) |
|
|
106 | VARx(int, epoll_epermcnt) |
|
|
107 | VARx(int, epoll_epermmax) |
89 | #endif |
108 | #endif |
90 | |
109 | |
91 | #if EV_USE_KQUEUE || EV_GENWRAP |
110 | #if EV_USE_KQUEUE || EV_GENWRAP |
92 | VARx(struct kevent *, kqueue_changes) |
111 | VARx(struct kevent *, kqueue_changes) |
93 | VARx(int, kqueue_changemax) |
112 | VARx(int, kqueue_changemax) |
… | |
… | |
99 | #if EV_USE_PORT || EV_GENWRAP |
118 | #if EV_USE_PORT || EV_GENWRAP |
100 | VARx(struct port_event *, port_events) |
119 | VARx(struct port_event *, port_events) |
101 | VARx(int, port_eventmax) |
120 | VARx(int, port_eventmax) |
102 | #endif |
121 | #endif |
103 | |
122 | |
104 | VARx(ANFD *, anfds) |
123 | #if EV_USE_IOCP || EV_GENWRAP |
105 | VARx(int, anfdmax) |
124 | VARx(HANDLE, iocp) |
106 | |
125 | #endif |
107 | VAR (pendings, ANPENDING *pendings [NUMPRI]) |
|
|
108 | VAR (pendingmax, int pendingmax [NUMPRI]) |
|
|
109 | VAR (pendingcnt, int pendingcnt [NUMPRI]) |
|
|
110 | |
126 | |
111 | VARx(int *, fdchanges) |
127 | VARx(int *, fdchanges) |
112 | VARx(int, fdchangemax) |
128 | VARx(int, fdchangemax) |
113 | VARx(int, fdchangecnt) |
129 | VARx(int, fdchangecnt) |
114 | |
130 | |
115 | VARx(WT *, timers) |
131 | VARx(ANHE *, timers) |
116 | VARx(int, timermax) |
132 | VARx(int, timermax) |
117 | VARx(int, timercnt) |
133 | VARx(int, timercnt) |
118 | |
134 | |
119 | #if EV_PERIODIC_ENABLE || EV_GENWRAP |
135 | #if EV_PERIODIC_ENABLE || EV_GENWRAP |
120 | VARx(WT *, periodics) |
136 | VARx(ANHE *, periodics) |
121 | VARx(int, periodicmax) |
137 | VARx(int, periodicmax) |
122 | VARx(int, periodiccnt) |
138 | VARx(int, periodiccnt) |
123 | #endif |
139 | #endif |
124 | |
140 | |
125 | #if EV_IDLE_ENABLE || EV_GENWRAP |
141 | #if EV_IDLE_ENABLE || EV_GENWRAP |
… | |
… | |
141 | VARx(struct ev_fork **, forks) |
157 | VARx(struct ev_fork **, forks) |
142 | VARx(int, forkmax) |
158 | VARx(int, forkmax) |
143 | VARx(int, forkcnt) |
159 | VARx(int, forkcnt) |
144 | #endif |
160 | #endif |
145 | |
161 | |
146 | VARx(EV_ATOMIC_T, gotasync) |
162 | #if EV_CLEANUP_ENABLE || EV_GENWRAP |
|
|
163 | VARx(struct ev_cleanup **, cleanups) |
|
|
164 | VARx(int, cleanupmax) |
|
|
165 | VARx(int, cleanupcnt) |
|
|
166 | #endif |
|
|
167 | |
147 | #if EV_ASYNC_ENABLE || EV_GENWRAP |
168 | #if EV_ASYNC_ENABLE || EV_GENWRAP |
|
|
169 | VARx(EV_ATOMIC_T, async_pending) |
148 | VARx(struct ev_async **, asyncs) |
170 | VARx(struct ev_async **, asyncs) |
149 | VARx(int, asyncmax) |
171 | VARx(int, asyncmax) |
150 | VARx(int, asynccnt) |
172 | VARx(int, asynccnt) |
151 | #endif |
173 | #endif |
152 | |
174 | |
153 | #if EV_USE_INOTIFY || EV_GENWRAP |
175 | #if EV_USE_INOTIFY || EV_GENWRAP |
154 | VARx(int, fs_fd) |
176 | VARx(int, fs_fd) |
155 | VARx(ev_io, fs_w) |
177 | VARx(ev_io, fs_w) |
|
|
178 | VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ |
156 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
179 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
157 | #endif |
180 | #endif |
158 | |
181 | |
|
|
182 | VARx(EV_ATOMIC_T, sig_pending) |
|
|
183 | #if EV_USE_SIGNALFD || EV_GENWRAP |
|
|
184 | VARx(int, sigfd) |
|
|
185 | VARx(ev_io, sigfd_w) |
|
|
186 | VARx(sigset_t, sigfd_set) |
|
|
187 | #endif |
|
|
188 | |
|
|
189 | #if EV_FEATURE_API || EV_GENWRAP |
|
|
190 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
|
|
191 | VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ |
|
|
192 | |
|
|
193 | VARx(void *, userdata) |
|
|
194 | VAR (release_cb, void (*release_cb)(EV_P)) |
|
|
195 | VAR (acquire_cb, void (*acquire_cb)(EV_P)) |
|
|
196 | VAR (invoke_cb , void (*invoke_cb) (EV_P)) |
|
|
197 | #endif |
|
|
198 | |
159 | #undef VARx |
199 | #undef VARx |
160 | |
200 | |