From c7c37f3fc739428befba0df00f2b05c8d7c751c9 Mon Sep 17 00:00:00 2001 From: Jonathan Neuschäfer Date: Tue, 29 May 2018 02:36:18 +0200 Subject: mpmc_ptr_ring: Fix the remaining crash --- src/mpmc_ptr_ring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 @@ -114,11 +114,11 @@ static inline void *mpmc_ptr_ring_consume(struct mpmc_ptr_ring *r) size_t mask = r->size - 1; 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) -- cgit v1.2.3-59-g8ed1b