1171169Smlaier/*
2171169Smlaier * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
3171169Smlaier * All rights reserved.
4171169Smlaier *
5171169Smlaier * Redistribution and use in source and binary forms, with or without
6171169Smlaier * modification, are permitted provided that the following conditions
7171169Smlaier * are met:
8171169Smlaier * 1. Redistributions of source code must retain the above copyright
9171169Smlaier *    notice, this list of conditions and the following disclaimer.
10171169Smlaier * 2. Redistributions in binary form must reproduce the above copyright
11171169Smlaier *    notice, this list of conditions and the following disclaimer in the
12171169Smlaier *    documentation and/or other materials provided with the distribution.
13171169Smlaier * 3. The name of the author may not be used to endorse or promote products
14171169Smlaier *    derived from this software without specific prior written permission.
15171169Smlaier *
16171169Smlaier * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17171169Smlaier * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18171169Smlaier * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19171169Smlaier * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20171169Smlaier * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21171169Smlaier * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22171169Smlaier * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23171169Smlaier * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24171169Smlaier * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25171169Smlaier * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26171169Smlaier */
27171169Smlaier#ifndef _EVENT_INTERNAL_H_
28171169Smlaier#define _EVENT_INTERNAL_H_
29171169Smlaier
30171169Smlaier#ifdef __cplusplus
31171169Smlaierextern "C" {
32171169Smlaier#endif
33171169Smlaier
34171169Smlaierstruct event_base {
35171169Smlaier	const struct eventop *evsel;
36171169Smlaier	void *evbase;
37171169Smlaier	int event_count;		/* counts number of total events */
38171169Smlaier	int event_count_active;	/* counts number of active events */
39171169Smlaier
40171169Smlaier	int event_gotterm;		/* Set to terminate loop */
41171169Smlaier
42171169Smlaier	/* active event management */
43171169Smlaier	struct event_list **activequeues;
44171169Smlaier	int nactivequeues;
45171169Smlaier
46171169Smlaier	struct event_list eventqueue;
47171169Smlaier	struct timeval event_tv;
48171169Smlaier
49171169Smlaier	RB_HEAD(event_tree, event) timetree;
50171169Smlaier};
51171169Smlaier
52171169Smlaier#ifdef __cplusplus
53171169Smlaier}
54171169Smlaier#endif
55171169Smlaier
56171169Smlaier#endif /* _EVENT_INTERNAL_H_ */
57