--- libev/ev_linuxaio.c 2019/06/24 00:04:26 1.15 +++ libev/ev_linuxaio.c 2019/06/24 00:30:24 1.16 @@ -248,7 +248,9 @@ linuxaio_parse_events (EV_A_ ring->io_events, tail); } - /* as an extension to C, we hope that the volatile will makethis atomic and once-only */ + /* TODO: we only need a compiler barrier here, not a read fence */ + ECB_MEMORY_FENCE_RELEASE; + /* as an extension to C, we hope that the volatile will make this atomic and once-only */ *(volatile unsigned *)&ring->head = tail; /* make sure kernel can see our new head value - probably not required */ ECB_MEMORY_FENCE_RELEASE;