… | |
… | |
191 | } |
191 | } |
192 | } |
192 | } |
193 | |
193 | |
194 | static void poll_wait () |
194 | static void poll_wait () |
195 | { |
195 | { |
|
|
196 | fd_set rfd; |
|
|
197 | |
196 | while (nreqs) |
198 | while (nreqs) |
197 | { |
199 | { |
198 | aio_req req; |
200 | aio_req req; |
199 | pthread_mutex_lock (&reslock); |
201 | pthread_mutex_lock (&reslock); |
200 | req = ress; |
202 | req = ress; |
201 | pthread_mutex_unlock (&reslock); |
203 | pthread_mutex_unlock (&reslock); |
202 | |
204 | |
203 | if (req) |
205 | if (req) |
204 | return; |
206 | return; |
205 | |
207 | |
206 | fd_set rfd; |
|
|
207 | FD_ZERO(&rfd); |
208 | FD_ZERO(&rfd); |
208 | FD_SET(respipe [0], &rfd); |
209 | FD_SET(respipe [0], &rfd); |
209 | |
210 | |
210 | select (respipe [0] + 1, &rfd, 0, 0, 0); |
211 | select (respipe [0] + 1, &rfd, 0, 0, 0); |
211 | } |
212 | } |