From e7b6bda15cac1001349122cdaf31b2272207d005 Mon Sep 17 00:00:00 2001 From: Marc Alexander Lehmann Date: Sun, 23 Jun 2019 23:02:09 +0000 Subject: [PATCH] *** empty log message *** --- ev_linuxaio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ev_linuxaio.c b/ev_linuxaio.c index 472b522..3733034 100644 --- a/ev_linuxaio.c +++ b/ev_linuxaio.c @@ -233,6 +233,7 @@ linuxaio_get_events_from_ring (EV_P) || ring->header_length != sizeof (struct aio_ring)) /* TODO: or use it to find io_event[0]? */ return 0; + /* make sure the events up to tail are visible */ ECB_MEMORY_FENCE_ACQUIRE; /* parse all available events, but only once, to avoid starvation */ @@ -245,8 +246,7 @@ linuxaio_get_events_from_ring (EV_P) } *(volatile unsigned *)&ring->head = tail; - - /* again, other implementations don't do this, but I think it's required for the kernel to see free slots */ + /* make sure kernel can see our new head value - probably not required */ ECB_MEMORY_FENCE_RELEASE; return 1;