aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mpmc_ptr_ring.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mpmc_ptr_ring.h b/src/mpmc_ptr_ring.h
index 7145a4e..be7c2ff 100644
--- a/src/mpmc_ptr_ring.h
+++ b/src/mpmc_ptr_ring.h
@@ -115,10 +115,10 @@ static inline void *mpmc_ptr_ring_consume(struct mpmc_ptr_ring *r)
for (;;) {
mb(); // TODO: check
- p = atomic_long_read(&r->producer_tail);
- mb(); // TODO: check
c = atomic_long_read(&r->consumer_head);
mb(); // TODO: check
+ p = atomic_long_read(&r->producer_tail);
+ mb(); // TODO: check
/* Is the ring empty? */
if (p == c)