1*67ecd4f3SMax Laier /* 2*67ecd4f3SMax Laier * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu> 3*67ecd4f3SMax Laier * All rights reserved. 4*67ecd4f3SMax Laier * 5*67ecd4f3SMax Laier * Redistribution and use in source and binary forms, with or without 6*67ecd4f3SMax Laier * modification, are permitted provided that the following conditions 7*67ecd4f3SMax Laier * are met: 8*67ecd4f3SMax Laier * 1. Redistributions of source code must retain the above copyright 9*67ecd4f3SMax Laier * notice, this list of conditions and the following disclaimer. 10*67ecd4f3SMax Laier * 2. Redistributions in binary form must reproduce the above copyright 11*67ecd4f3SMax Laier * notice, this list of conditions and the following disclaimer in the 12*67ecd4f3SMax Laier * documentation and/or other materials provided with the distribution. 13*67ecd4f3SMax Laier * 3. The name of the author may not be used to endorse or promote products 14*67ecd4f3SMax Laier * derived from this software without specific prior written permission. 15*67ecd4f3SMax Laier * 16*67ecd4f3SMax Laier * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17*67ecd4f3SMax Laier * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18*67ecd4f3SMax Laier * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19*67ecd4f3SMax Laier * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20*67ecd4f3SMax Laier * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21*67ecd4f3SMax Laier * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22*67ecd4f3SMax Laier * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23*67ecd4f3SMax Laier * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24*67ecd4f3SMax Laier * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25*67ecd4f3SMax Laier * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26*67ecd4f3SMax Laier */ 27*67ecd4f3SMax Laier #ifndef _EVENT_INTERNAL_H_ 28*67ecd4f3SMax Laier #define _EVENT_INTERNAL_H_ 29*67ecd4f3SMax Laier 30*67ecd4f3SMax Laier #ifdef __cplusplus 31*67ecd4f3SMax Laier extern "C" { 32*67ecd4f3SMax Laier #endif 33*67ecd4f3SMax Laier 34*67ecd4f3SMax Laier struct event_base { 35*67ecd4f3SMax Laier const struct eventop *evsel; 36*67ecd4f3SMax Laier void *evbase; 37*67ecd4f3SMax Laier int event_count; /* counts number of total events */ 38*67ecd4f3SMax Laier int event_count_active; /* counts number of active events */ 39*67ecd4f3SMax Laier 40*67ecd4f3SMax Laier int event_gotterm; /* Set to terminate loop */ 41*67ecd4f3SMax Laier 42*67ecd4f3SMax Laier /* active event management */ 43*67ecd4f3SMax Laier struct event_list **activequeues; 44*67ecd4f3SMax Laier int nactivequeues; 45*67ecd4f3SMax Laier 46*67ecd4f3SMax Laier struct event_list eventqueue; 47*67ecd4f3SMax Laier struct timeval event_tv; 48*67ecd4f3SMax Laier 49*67ecd4f3SMax Laier RB_HEAD(event_tree, event) timetree; 50*67ecd4f3SMax Laier }; 51*67ecd4f3SMax Laier 52*67ecd4f3SMax Laier #ifdef __cplusplus 53*67ecd4f3SMax Laier } 54*67ecd4f3SMax Laier #endif 55*67ecd4f3SMax Laier 56*67ecd4f3SMax Laier #endif /* _EVENT_INTERNAL_H_ */ 57