ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev_vars.h
(Generate patch)

Comparing libev/ev_vars.h (file contents):
Revision 1.16 by root, Thu Nov 29 17:28:13 2007 UTC vs.
Revision 1.42 by root, Sat Oct 23 22:25:44 2010 UTC

1/*
2 * loop member variable declarations
3 *
4 * Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev@schmorp.de>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without modifica-
8 * tion, are permitted provided that the following conditions are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright notice,
11 * this list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
19 * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
20 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
21 * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
25 * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26 * OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU General Public License ("GPL") version 2 or any later version,
30 * in which case the provisions of the GPL are applicable instead of
31 * the above. If you wish to allow the use of your version of this file
32 * only under the terms of the GPL and not to allow others to use your
33 * version of this file under the BSD license, indicate your decision
34 * by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL. If you do not delete the
36 * provisions above, a recipient may use your version of this file under
37 * either the BSD or the GPL.
38 */
39
1#define VARx(type,name) VAR(name, type name) 40#define VARx(type,name) VAR(name, type name)
2 41
3VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */ 42VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */
4VARx(ev_tstamp, mn_now) /* monotonic clock "now" */ 43VARx(ev_tstamp, mn_now) /* monotonic clock "now" */
5VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */ 44VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */
45
46VARx(ev_tstamp, io_blocktime)
47VARx(ev_tstamp, timeout_blocktime)
48
6VARx(int, backend) 49VARx(int, backend)
7VARx(int, activecnt) /* total number of active events ("refcount") */ 50VARx(int, activecnt) /* total number of active events ("refcount") */
51VARx(EV_ATOMIC_T, loop_done) /* signal by ev_break */
8 52
53VARx(int, backend_fd)
9VARx(ev_tstamp, backend_fudge) /* assumed typical timer resolution */ 54VARx(ev_tstamp, backend_fudge) /* assumed typical timer resolution */
10VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev)) 55VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev))
11VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout)) 56VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout))
57
58VARx(ANFD *, anfds)
59VARx(int, anfdmax)
60
61VAR (pendings, ANPENDING *pendings [NUMPRI])
62VAR (pendingmax, int pendingmax [NUMPRI])
63VAR (pendingcnt, int pendingcnt [NUMPRI])
64VARx(ev_prepare, pending_w) /* dummy pending watcher */
65
66/* for reverse feeding of events */
67VARx(W *, rfeeds)
68VARx(int, rfeedmax)
69VARx(int, rfeedcnt)
70
71#if EV_USE_EVENTFD || EV_GENWRAP
12VARx(int, backend_fd) 72VARx(int, evfd)
73#endif
74VAR (evpipe, int evpipe [2])
75VARx(ev_io, pipe_w)
13 76
14#if !defined(_WIN32) || EV_GENWRAP 77#if !defined(_WIN32) || EV_GENWRAP
15VARx(pid_t, curpid) 78VARx(pid_t, curpid)
16#endif 79#endif
17 80
18VARx(int, postfork) /* true if we need to recreate kernel state after fork */ 81VARx(char, postfork) /* true if we need to recreate kernel state after fork */
19 82
20#if EV_USE_SELECT || EV_GENWRAP 83#if EV_USE_SELECT || EV_GENWRAP
21VARx(void *, vec_ri) 84VARx(void *, vec_ri)
22VARx(void *, vec_ro) 85VARx(void *, vec_ro)
23VARx(void *, vec_wi) 86VARx(void *, vec_wi)
24VARx(void *, vec_wo) 87VARx(void *, vec_wo)
88#if defined(_WIN32) || EV_GENWRAP
89VARx(void *, vec_eo)
90#endif
25VARx(int, vec_max) 91VARx(int, vec_max)
26#endif 92#endif
27 93
28#if EV_USE_POLL || EV_GENWRAP 94#if EV_USE_POLL || EV_GENWRAP
29VARx(struct pollfd *, polls) 95VARx(struct pollfd *, polls)
49#if EV_USE_PORT || EV_GENWRAP 115#if EV_USE_PORT || EV_GENWRAP
50VARx(struct port_event *, port_events) 116VARx(struct port_event *, port_events)
51VARx(int, port_eventmax) 117VARx(int, port_eventmax)
52#endif 118#endif
53 119
54VARx(ANFD *, anfds) 120#if EV_USE_IOCP || EV_GENWRAP
55VARx(int, anfdmax) 121VARx(HANDLE, iocp)
56 122#endif
57VAR (pendings, ANPENDING *pendings [NUMPRI])
58VAR (pendingmax, int pendingmax [NUMPRI])
59VAR (pendingcnt, int pendingcnt [NUMPRI])
60 123
61VARx(int *, fdchanges) 124VARx(int *, fdchanges)
62VARx(int, fdchangemax) 125VARx(int, fdchangemax)
63VARx(int, fdchangecnt) 126VARx(int, fdchangecnt)
64 127
65VARx(struct ev_timer **, timers) 128VARx(ANHE *, timers)
66VARx(int, timermax) 129VARx(int, timermax)
67VARx(int, timercnt) 130VARx(int, timercnt)
68 131
69#if EV_PERIODIC_ENABLE || EV_GENWRAP 132#if EV_PERIODIC_ENABLE || EV_GENWRAP
70VARx(struct ev_periodic **, periodics) 133VARx(ANHE *, periodics)
71VARx(int, periodicmax) 134VARx(int, periodicmax)
72VARx(int, periodiccnt) 135VARx(int, periodiccnt)
73#endif 136#endif
74 137
75VARx(struct ev_idle **, idles) 138#if EV_IDLE_ENABLE || EV_GENWRAP
76VARx(int, idlemax) 139VAR (idles, ev_idle **idles [NUMPRI])
77VARx(int, idlecnt) 140VAR (idlemax, int idlemax [NUMPRI])
141VAR (idlecnt, int idlecnt [NUMPRI])
142#endif
143VARx(int, idleall) /* total number */
78 144
79VARx(struct ev_prepare **, prepares) 145VARx(struct ev_prepare **, prepares)
80VARx(int, preparemax) 146VARx(int, preparemax)
81VARx(int, preparecnt) 147VARx(int, preparecnt)
82 148
88VARx(struct ev_fork **, forks) 154VARx(struct ev_fork **, forks)
89VARx(int, forkmax) 155VARx(int, forkmax)
90VARx(int, forkcnt) 156VARx(int, forkcnt)
91#endif 157#endif
92 158
159#if EV_ASYNC_ENABLE || EV_GENWRAP
160VARx(EV_ATOMIC_T, async_pending)
161VARx(struct ev_async **, asyncs)
162VARx(int, asyncmax)
163VARx(int, asynccnt)
164#endif
165
93#if EV_USE_INOTIFY || EV_GENWRAP 166#if EV_USE_INOTIFY || EV_GENWRAP
94VARx(int, fs_fd) 167VARx(int, fs_fd)
95VARx(ev_io, fs_w) 168VARx(ev_io, fs_w)
169VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */
96VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) 170VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE])
171#endif
172
173VARx(EV_ATOMIC_T, sig_pending)
174#if EV_USE_SIGNALFD || EV_GENWRAP
175VARx(int, sigfd)
176VARx(ev_io, sigfd_w)
177VARx(sigset_t, sigfd_set)
178#endif
179
180#if EV_FEATURE_API || EV_GENWRAP
181VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */
182VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */
183
184VARx(void *, userdata)
185VAR (release_cb, void (*release_cb)(EV_P))
186VAR (acquire_cb, void (*acquire_cb)(EV_P))
187VAR (invoke_cb , void (*invoke_cb) (EV_P))
97#endif 188#endif
98 189
99#undef VARx 190#undef VARx
100 191

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines