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 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) |
… | |
… | |
99 | #if EV_USE_PORT || EV_GENWRAP |
115 | #if EV_USE_PORT || EV_GENWRAP |
100 | VARx(struct port_event *, port_events) |
116 | VARx(struct port_event *, port_events) |
101 | VARx(int, port_eventmax) |
117 | VARx(int, port_eventmax) |
102 | #endif |
118 | #endif |
103 | |
119 | |
104 | VARx(ANFD *, anfds) |
|
|
105 | VARx(int, anfdmax) |
|
|
106 | |
|
|
107 | VAR (pendings, ANPENDING *pendings [NUMPRI]) |
|
|
108 | VAR (pendingmax, int pendingmax [NUMPRI]) |
|
|
109 | VAR (pendingcnt, int pendingcnt [NUMPRI]) |
|
|
110 | |
|
|
111 | VARx(int *, fdchanges) |
120 | VARx(int *, fdchanges) |
112 | VARx(int, fdchangemax) |
121 | VARx(int, fdchangemax) |
113 | VARx(int, fdchangecnt) |
122 | VARx(int, fdchangecnt) |
114 | |
123 | |
115 | VARx(WT *, timers) |
124 | VARx(ANHE *, timers) |
116 | VARx(int, timermax) |
125 | VARx(int, timermax) |
117 | VARx(int, timercnt) |
126 | VARx(int, timercnt) |
118 | |
127 | |
119 | #if EV_PERIODIC_ENABLE || EV_GENWRAP |
128 | #if EV_PERIODIC_ENABLE || EV_GENWRAP |
120 | VARx(WT *, periodics) |
129 | VARx(ANHE *, periodics) |
121 | VARx(int, periodicmax) |
130 | VARx(int, periodicmax) |
122 | VARx(int, periodiccnt) |
131 | VARx(int, periodiccnt) |
123 | #endif |
132 | #endif |
124 | |
133 | |
125 | #if EV_IDLE_ENABLE || EV_GENWRAP |
134 | #if EV_IDLE_ENABLE || EV_GENWRAP |
… | |
… | |
141 | VARx(struct ev_fork **, forks) |
150 | VARx(struct ev_fork **, forks) |
142 | VARx(int, forkmax) |
151 | VARx(int, forkmax) |
143 | VARx(int, forkcnt) |
152 | VARx(int, forkcnt) |
144 | #endif |
153 | #endif |
145 | |
154 | |
146 | VARx(EV_ATOMIC_T, gotasync) |
|
|
147 | #if EV_ASYNC_ENABLE || EV_GENWRAP |
155 | #if EV_ASYNC_ENABLE || EV_GENWRAP |
|
|
156 | VARx(EV_ATOMIC_T, async_pending) |
148 | VARx(struct ev_async **, asyncs) |
157 | VARx(struct ev_async **, asyncs) |
149 | VARx(int, asyncmax) |
158 | VARx(int, asyncmax) |
150 | VARx(int, asynccnt) |
159 | VARx(int, asynccnt) |
151 | #endif |
160 | #endif |
152 | |
161 | |
153 | #if EV_USE_INOTIFY || EV_GENWRAP |
162 | #if EV_USE_INOTIFY || EV_GENWRAP |
154 | VARx(int, fs_fd) |
163 | VARx(int, fs_fd) |
155 | VARx(ev_io, fs_w) |
164 | VARx(ev_io, fs_w) |
|
|
165 | 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]) |
166 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
|
|
167 | #endif |
|
|
168 | |
|
|
169 | VARx(EV_ATOMIC_T, sig_pending) |
|
|
170 | #if EV_USE_SIGNALFD || EV_GENWRAP |
|
|
171 | VARx(int, sigfd) |
|
|
172 | VARx(ev_io, sigfd_w) |
|
|
173 | VARx(sigset_t, sigfd_set) |
|
|
174 | #endif |
|
|
175 | |
|
|
176 | #if EV_FEATURE_API || EV_GENWRAP |
|
|
177 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
|
|
178 | VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ |
|
|
179 | |
|
|
180 | VARx(void *, userdata) |
|
|
181 | VAR (release_cb, void (*release_cb)(EV_P)) |
|
|
182 | VAR (acquire_cb, void (*acquire_cb)(EV_P)) |
|
|
183 | VAR (invoke_cb , void (*invoke_cb) (EV_P)) |
157 | #endif |
184 | #endif |
158 | |
185 | |
159 | #undef VARx |
186 | #undef VARx |
160 | |
187 | |