… | |
… | |
52 | void *ev_arg; |
52 | void *ev_arg; |
53 | int ev_fd; |
53 | int ev_fd; |
54 | int ev_pri; |
54 | int ev_pri; |
55 | int ev_res; |
55 | int ev_res; |
56 | short ev_events; |
56 | short ev_events; |
|
|
57 | |
|
|
58 | char initialised; /* flag to work around some idiosynchrasies in the API */ |
57 | }; |
59 | }; |
58 | |
60 | |
59 | #define EV_PERSIST 0x10 |
61 | #define EV_PERSIST 0x10 |
60 | |
62 | |
61 | #define EVENT_SIGNAL(ev) ((int) (ev)->ev_fd) |
63 | #define EVENT_SIGNAL(ev) ((int) (ev)->ev_fd) |
62 | #define EVENT_FD(ev) ((int) (ev)->ev_fd) |
64 | #define EVENT_FD(ev) ((int) (ev)->ev_fd) |
63 | |
65 | |
64 | #define event_initialized(ev) 1 |
66 | #define event_initialized(ev) ((ev)->initialised) |
65 | |
67 | |
66 | #define evtimer_add(ev,tv) event_add (ev, tv) |
68 | #define evtimer_add(ev,tv) event_add (ev, tv) |
67 | #define evtimer_set(ev,cb,data) event_set (ev, -1, 0, cb, data) |
69 | #define evtimer_set(ev,cb,data) event_set (ev, -1, 0, cb, data) |
68 | #define evtimer_del(ev) event_del (ev) |
70 | #define evtimer_del(ev) event_del (ev) |
69 | #define evtimer_pending(ev,tv) event_pending (ev, EV_TIMEOUT, tv) |
71 | #define evtimer_pending(ev,tv) event_pending (ev, EV_TIMEOUT, tv) |