diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2018-07-01 05:28:37 +0200 |
---|---|---|
committer | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2018-07-01 05:30:49 +0200 |
commit | 7c129493ef9ab0802bd6c789561197befbe0367c (patch) | |
tree | 072c2bf143f4723a6331f87d5ac19c7194be1437 | |
parent | [WIP] implement a lock-free MPMC ring buffer (diff) | |
download | wireguard-monolithic-historical-7c129493ef9ab0802bd6c789561197befbe0367c.tar.xz wireguard-monolithic-historical-7c129493ef9ab0802bd6c789561197befbe0367c.zip |
mpmc_ptr_ring: fix the remaining crash
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
-rw-r--r-- | src/mpmc_ptr_ring.h | 4 |
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) |