… | |
… | |
242 | { |
242 | { |
243 | linuxaio_parse_events (EV_A_ ring->io_events + head, ring->nr - head); |
243 | linuxaio_parse_events (EV_A_ ring->io_events + head, ring->nr - head); |
244 | linuxaio_parse_events (EV_A_ ring->io_events, tail); |
244 | linuxaio_parse_events (EV_A_ ring->io_events, tail); |
245 | } |
245 | } |
246 | |
246 | |
247 | ring->head = tail; |
247 | *(volatile unsigned *)&ring->head = tail; |
|
|
248 | |
|
|
249 | /* again, other implementations don't do this, but I think it's required for the kernel to see free slots */ |
|
|
250 | ECB_MEMORY_FENCE_RELEASE; |
248 | |
251 | |
249 | return 1; |
252 | return 1; |
250 | } |
253 | } |
251 | |
254 | |
252 | /* read at least one event from kernel, or timeout */ |
255 | /* read at least one event from kernel, or timeout */ |