From 3e9b8f36db4eb4d4d6256b078e8e32c84367212d Mon Sep 17 00:00:00 2001 From: Ge Wang Date: Wed, 15 May 2024 16:15:47 -0700 Subject: [PATCH] minor tweaks to FinalRingBuffer --- src/core/util_buffers.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/util_buffers.h b/src/core/util_buffers.h index 0a1dec8f9..679e7a88b 100644 --- a/src/core/util_buffers.h +++ b/src/core/util_buffers.h @@ -730,7 +730,7 @@ bool XCircleBuffer::get( T * result ) // desc: hopefully this will the last lock-free queue we need to implement... // hopefully not like Final Fantasy which has 15 sequels to date // -// adapted from: +// added 1.5.2.5 (ge) | adapted from: // Lock-Free Ring Buffer (LFRB) for embedded systems // GitHub: https://github.com/QuantumLeaps/lock-free-ring-buffer // SPDX-License-Identifier: MIT @@ -750,7 +750,8 @@ bool XCircleBuffer::get( T * result ) * correctly aligned for "atomic" access. In practice, most C compilers * should provide such natural alignment (by inserting some padding into the * ::FinalRingBuffer class/struct, if necessary). */ -#define FinalBufferAtomic std::atomic +//----------------------------------------------------------------------------- +typedef std::atomic_ulong FinalBufferAtomic; //----------------------------------------------------------------------------- template class FinalRingBuffer