167ecd4f3SMax Laier /* 267ecd4f3SMax Laier * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu> 367ecd4f3SMax Laier * All rights reserved. 467ecd4f3SMax Laier * 567ecd4f3SMax Laier * Redistribution and use in source and binary forms, with or without 667ecd4f3SMax Laier * modification, are permitted provided that the following conditions 767ecd4f3SMax Laier * are met: 867ecd4f3SMax Laier * 1. Redistributions of source code must retain the above copyright 967ecd4f3SMax Laier * notice, this list of conditions and the following disclaimer. 1067ecd4f3SMax Laier * 2. Redistributions in binary form must reproduce the above copyright 1167ecd4f3SMax Laier * notice, this list of conditions and the following disclaimer in the 1267ecd4f3SMax Laier * documentation and/or other materials provided with the distribution. 1367ecd4f3SMax Laier * 3. The name of the author may not be used to endorse or promote products 1467ecd4f3SMax Laier * derived from this software without specific prior written permission. 1567ecd4f3SMax Laier * 1667ecd4f3SMax Laier * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1767ecd4f3SMax Laier * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1867ecd4f3SMax Laier * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1967ecd4f3SMax Laier * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2067ecd4f3SMax Laier * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2167ecd4f3SMax Laier * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2267ecd4f3SMax Laier * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2367ecd4f3SMax Laier * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2467ecd4f3SMax Laier * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2567ecd4f3SMax Laier * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2667ecd4f3SMax Laier */ 2767ecd4f3SMax Laier #ifndef _EVENT_INTERNAL_H_ 2867ecd4f3SMax Laier #define _EVENT_INTERNAL_H_ 2967ecd4f3SMax Laier 3067ecd4f3SMax Laier #ifdef __cplusplus 3167ecd4f3SMax Laier extern "C" { 3267ecd4f3SMax Laier #endif 3367ecd4f3SMax Laier 3467ecd4f3SMax Laier struct event_base { 3567ecd4f3SMax Laier const struct eventop *evsel; 3667ecd4f3SMax Laier void *evbase; 3767ecd4f3SMax Laier int event_count; /* counts number of total events */ 3867ecd4f3SMax Laier int event_count_active; /* counts number of active events */ 3967ecd4f3SMax Laier 4067ecd4f3SMax Laier int event_gotterm; /* Set to terminate loop */ 4167ecd4f3SMax Laier 4267ecd4f3SMax Laier /* active event management */ 4367ecd4f3SMax Laier struct event_list **activequeues; 4467ecd4f3SMax Laier int nactivequeues; 4567ecd4f3SMax Laier 4667ecd4f3SMax Laier struct event_list eventqueue; 4767ecd4f3SMax Laier struct timeval event_tv; 4867ecd4f3SMax Laier 4967ecd4f3SMax Laier RB_HEAD(event_tree, event) timetree; 5067ecd4f3SMax Laier }; 5167ecd4f3SMax Laier 5267ecd4f3SMax Laier #ifdef __cplusplus 5367ecd4f3SMax Laier } 5467ecd4f3SMax Laier #endif 5567ecd4f3SMax Laier 5667ecd4f3SMax Laier #endif /* _EVENT_INTERNAL_H_ */ 57