Go to the documentation of this file.
39 #define EVENT_READ (1 << READ_SHIFT)
40 #define EVENT_WRITE (1 << WRITE_SHIFT)
61 #define SOCKET_SHIFT 0
62 #define SOCKET_READ (1 << (SOCKET_SHIFT + READ_SHIFT))
63 #define SOCKET_WRITE (1 << (SOCKET_SHIFT + WRITE_SHIFT))
65 #define TUN_READ (1 << (TUN_SHIFT + READ_SHIFT))
66 #define TUN_WRITE (1 << (TUN_SHIFT + WRITE_SHIFT))
68 #define ES_ERROR (1 << (ERR_SHIFT + READ_SHIFT))
69 #define ES_TIMEOUT (1 << (ERR_SHIFT + WRITE_SHIFT))
70 #define MANAGEMENT_SHIFT 6
71 #define MANAGEMENT_READ (1 << (MANAGEMENT_SHIFT + READ_SHIFT))
72 #define MANAGEMENT_WRITE (1 << (MANAGEMENT_SHIFT + WRITE_SHIFT))
74 #define FILE_CLOSED (1 << (FILE_SHIFT + READ_SHIFT))
76 #define DCO_READ (1 << (DCO_SHIFT + READ_SHIFT))
77 #define DCO_WRITE (1 << (DCO_SHIFT + WRITE_SHIFT))
82 #define EVENT_METHOD_US_TIMEOUT (1<<0)
83 #define EVENT_METHOD_FAST (1<<1)
89 #define UNDEFINED_EVENT (NULL)
95 #define UNDEFINED_EVENT (-1)
143 (*
es->func.free)(
es);
150 (*
es->func.reset)(
es);
156 (*
es->func.del)(
es, event);
162 (*
es->func.ctl)(
es, event, rwflags, arg);
170 ret = (*
es->func.wait)(
es, tv, out, outlen);
void(* del)(struct event_set *es, event_t event)
struct event_set_functions func
void(* ctl)(struct event_set *es, event_t event, unsigned int rwflags, void *arg)
#define HANDLE_DEFINED(h)
void(* reset)(struct event_set *es)
const struct rw_handle * event_t
int(* wait)(struct event_set *es, const struct timeval *tv, struct event_set_return *out, int outlen)
static void event_ctl(struct event_set *es, event_t event, unsigned int rwflags, void *arg)
static void event_del(struct event_set *es, event_t event)
struct event_set * event_set_init(int *maxevents, unsigned int flags)
static void perf_pop(void)
static void event_reset(struct event_set *es)
static void event_free(struct event_set *es)
static void wait_signal(struct event_set *es, void *arg)
static void event_set_return_init(struct event_set_return *esr)
void(* free)(struct event_set *es)
static void perf_push(int type)
static int event_wait(struct event_set *es, const struct timeval *tv, struct event_set_return *out, int outlen)