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 | |
… | |
… | |
102 | #if EV_USE_PORT || EV_GENWRAP |
115 | #if EV_USE_PORT || EV_GENWRAP |
103 | VARx(struct port_event *, port_events) |
116 | VARx(struct port_event *, port_events) |
104 | VARx(int, port_eventmax) |
117 | VARx(int, port_eventmax) |
105 | #endif |
118 | #endif |
106 | |
119 | |
107 | VARx(ANFD *, anfds) |
120 | #if EV_USE_IOCP || EV_GENWRAP |
108 | VARx(int, anfdmax) |
121 | VARx(HANDLE, iocp) |
109 | |
122 | #endif |
110 | VAR (pendings, ANPENDING *pendings [NUMPRI]) |
|
|
111 | VAR (pendingmax, int pendingmax [NUMPRI]) |
|
|
112 | VAR (pendingcnt, int pendingcnt [NUMPRI]) |
|
|
113 | |
|
|
114 | /* for reverse feeding of events */ |
|
|
115 | VARx(W *, rfeeds) |
|
|
116 | VARx(int, rfeedmax) |
|
|
117 | VARx(int, rfeedcnt) |
|
|
118 | |
123 | |
119 | VARx(int *, fdchanges) |
124 | VARx(int *, fdchanges) |
120 | VARx(int, fdchangemax) |
125 | VARx(int, fdchangemax) |
121 | VARx(int, fdchangecnt) |
126 | VARx(int, fdchangecnt) |
122 | |
127 | |
… | |
… | |
149 | VARx(struct ev_fork **, forks) |
154 | VARx(struct ev_fork **, forks) |
150 | VARx(int, forkmax) |
155 | VARx(int, forkmax) |
151 | VARx(int, forkcnt) |
156 | VARx(int, forkcnt) |
152 | #endif |
157 | #endif |
153 | |
158 | |
154 | VARx(EV_ATOMIC_T, gotasync) |
|
|
155 | #if EV_ASYNC_ENABLE || EV_GENWRAP |
159 | #if EV_ASYNC_ENABLE || EV_GENWRAP |
|
|
160 | VARx(EV_ATOMIC_T, async_pending) |
156 | VARx(struct ev_async **, asyncs) |
161 | VARx(struct ev_async **, asyncs) |
157 | VARx(int, asyncmax) |
162 | VARx(int, asyncmax) |
158 | VARx(int, asynccnt) |
163 | VARx(int, asynccnt) |
159 | #endif |
164 | #endif |
160 | |
165 | |
… | |
… | |
163 | VARx(ev_io, fs_w) |
168 | VARx(ev_io, fs_w) |
164 | VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ |
169 | VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ |
165 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
170 | VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) |
166 | #endif |
171 | #endif |
167 | |
172 | |
|
|
173 | VARx(EV_ATOMIC_T, sig_pending) |
|
|
174 | #if EV_USE_SIGNALFD || EV_GENWRAP |
|
|
175 | VARx(int, sigfd) |
|
|
176 | VARx(ev_io, sigfd_w) |
|
|
177 | VARx(sigset_t, sigfd_set) |
|
|
178 | #endif |
|
|
179 | |
|
|
180 | #if EV_FEATURE_API || EV_GENWRAP |
|
|
181 | VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ |
|
|
182 | VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ |
|
|
183 | |
|
|
184 | VARx(void *, userdata) |
|
|
185 | VAR (release_cb, void (*release_cb)(EV_P)) |
|
|
186 | VAR (acquire_cb, void (*acquire_cb)(EV_P)) |
|
|
187 | VAR (invoke_cb , void (*invoke_cb) (EV_P)) |
|
|
188 | #endif |
|
|
189 | |
168 | #undef VARx |
190 | #undef VARx |
169 | |
191 | |