… | |
… | |
37 | * either the BSD or the GPL. |
37 | * either the BSD or the GPL. |
38 | */ |
38 | */ |
39 | |
39 | |
40 | #include <poll.h> |
40 | #include <poll.h> |
41 | |
41 | |
42 | void inline_size |
42 | inline_size |
|
|
43 | void |
43 | pollidx_init (int *base, int count) |
44 | pollidx_init (int *base, int count) |
44 | { |
45 | { |
45 | /* consider using memset (.., -1, ...), which is practically guaranteed |
46 | /* consider using memset (.., -1, ...), which is practically guaranteed |
46 | * to work on all systems implementing poll */ |
47 | * to work on all systems implementing poll */ |
47 | while (count--) |
48 | while (count--) |
… | |
… | |
124 | ); |
125 | ); |
125 | } |
126 | } |
126 | } |
127 | } |
127 | } |
128 | } |
128 | |
129 | |
129 | int inline_size |
130 | inline_size |
|
|
131 | int |
130 | poll_init (EV_P_ int flags) |
132 | poll_init (EV_P_ int flags) |
131 | { |
133 | { |
132 | backend_mintime = 1e-3; |
134 | backend_mintime = 1e-3; |
133 | backend_modify = poll_modify; |
135 | backend_modify = poll_modify; |
134 | backend_poll = poll_poll; |
136 | backend_poll = poll_poll; |
… | |
… | |
137 | polls = 0; pollmax = 0; pollcnt = 0; |
139 | polls = 0; pollmax = 0; pollcnt = 0; |
138 | |
140 | |
139 | return EVBACKEND_POLL; |
141 | return EVBACKEND_POLL; |
140 | } |
142 | } |
141 | |
143 | |
142 | void inline_size |
144 | inline_size |
|
|
145 | void |
143 | poll_destroy (EV_P) |
146 | poll_destroy (EV_P) |
144 | { |
147 | { |
145 | ev_free (pollidxs); |
148 | ev_free (pollidxs); |
146 | ev_free (polls); |
149 | ev_free (polls); |
147 | } |
150 | } |