2 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
7 * Copyright (c) 2003-2004, Jouni Malinen <jkmaline@cc.hut.fi>
8 * Sun elects to license this software under the BSD license.
9 * See README for more details.
14 #pragma ident "%Z%%M% %I% %E% SMI"
20 /* Magic number for eloop_cancel_timeout() */
21 #define ELOOP_ALL_CTX (void *) -1
22 #define MAX_POLLFDS 32
28 void (*handler
)(int, void *, void *);
31 struct eloop_timeout
{
35 void (*handler
)(void *, void *);
36 struct eloop_timeout
*next
;
42 void (*handler
)(int, void *, void *);
49 int max_sock
, reader_count
;
50 struct eloop_sock
*readers
;
52 struct eloop_timeout
*timeout
;
55 struct eloop_signal
*signals
;
61 void eloop_init(void *);
63 int eloop_register_read_sock(int,
64 void (*handler
)(int, void *, void *), void *, void *);
66 void eloop_unregister_read_sock(int);
68 int eloop_register_timeout(unsigned int, unsigned int,
69 void (*handler
)(void *, void *), void *, void *);
71 void eloop_cancel_timeout(void (*handler
)(void *, void *), void *, void *);
72 int eloop_register_signal(int, void (*handler
)(int, void *, void *), void *);
75 void eloop_terminate(void);
76 void eloop_destroy(void);
82 #endif /* __ELOOP_H */