00001 /* 00002 inet/generic/event.h 00003 00004 Created: April 1995 by Philip Homburg <philip@f-mnx.phicoh.com> 00005 00006 Header file for an event mechanism. 00007 00008 Copyright 1995 Philip Homburg 00009 */ 00010 00011 #ifndef INET__GENERIC__EVENT_H 00012 #define INET__GENERIC__EVENT_H 00013 00014 struct event; 00015 00016 typedef union ev_arg 00017 { 00018 int ev_int; 00019 void *ev_ptr; 00020 } ev_arg_t; 00021 00022 typedef void (*ev_func_t) ARGS(( struct event *ev, union ev_arg eva )); 00023 00024 typedef struct event 00025 { 00026 ev_func_t ev_func; 00027 ev_arg_t ev_arg; 00028 struct event *ev_next; 00029 } event_t; 00030 00031 extern event_t *ev_head; 00032 00033 void ev_init ARGS(( event_t *ev )); 00034 void ev_enqueue ARGS(( event_t *ev, ev_func_t func, ev_arg_t ev_arg )); 00035 void ev_process ARGS(( void )); 00036 int ev_in_queue ARGS(( event_t *ev )); 00037 00038 #endif /* INET__GENERIC__EVENT_H */ 00039 00040 /* 00041 * $PchId: event.h,v 1.5 2004/08/03 16:23:49 philip Exp $ 00042 */
1.5.8