Line | |
---|
1 | /*
|
---|
2 | inet/generic/event.h
|
---|
3 |
|
---|
4 | Created: April 1995 by Philip Homburg <philip@f-mnx.phicoh.com>
|
---|
5 |
|
---|
6 | Header file for an event mechanism.
|
---|
7 |
|
---|
8 | Copyright 1995 Philip Homburg
|
---|
9 | */
|
---|
10 |
|
---|
11 | #ifndef INET__GENERIC__EVENT_H
|
---|
12 | #define INET__GENERIC__EVENT_H
|
---|
13 |
|
---|
14 | struct event;
|
---|
15 |
|
---|
16 | typedef union ev_arg
|
---|
17 | {
|
---|
18 | int ev_int;
|
---|
19 | void *ev_ptr;
|
---|
20 | } ev_arg_t;
|
---|
21 |
|
---|
22 | typedef void (*ev_func_t) ARGS(( struct event *ev, union ev_arg eva ));
|
---|
23 |
|
---|
24 | typedef struct event
|
---|
25 | {
|
---|
26 | ev_func_t ev_func;
|
---|
27 | ev_arg_t ev_arg;
|
---|
28 | struct event *ev_next;
|
---|
29 | } event_t;
|
---|
30 |
|
---|
31 | extern event_t *ev_head;
|
---|
32 |
|
---|
33 | void ev_init ARGS(( event_t *ev ));
|
---|
34 | void ev_enqueue ARGS(( event_t *ev, ev_func_t func, ev_arg_t ev_arg ));
|
---|
35 | void ev_process ARGS(( void ));
|
---|
36 | int ev_in_queue ARGS(( event_t *ev ));
|
---|
37 |
|
---|
38 | #endif /* INET__GENERIC__EVENT_H */
|
---|
39 |
|
---|
40 | /*
|
---|
41 | * $PchId: event.h,v 1.5 2004/08/03 16:23:49 philip Exp $
|
---|
42 | */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.