From 758256fc39689310ea29b950f7ba76a4af3f955c Mon Sep 17 00:00:00 2001 From: Djordje Nedic Date: Thu, 18 May 2023 21:22:45 +0200 Subject: [PATCH] Release 1.0.2 --- CHANGELOG.md | 4 ++++ CMakeLists.txt | 2 +- lockfree/inc/bipartite_buf.hpp | 4 ++-- lockfree/inc/bipartite_buf_impl.hpp | 4 ++-- lockfree/inc/lockfree.hpp | 8 ++++---- lockfree/inc/queue.hpp | 6 +++--- lockfree/inc/queue_impl.hpp | 12 +++++------- lockfree/inc/ring_buf.hpp | 6 +++--- lockfree/inc/ring_buf_impl.hpp | 8 ++++---- 9 files changed, 28 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3284566..679c0d6 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.0.2 +- Made all class members accidentally public private +- Small doc fixes + ## 1.0.1 - Added static asserts to verify the template type arguments are trivial types diff --git a/CMakeLists.txt b/CMakeLists.txt index d4dca01..72422a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.16) project(lockfree - VERSION 1.0.1 + VERSION 1.0.2 LANGUAGES CXX ) diff --git a/lockfree/inc/bipartite_buf.hpp b/lockfree/inc/bipartite_buf.hpp index 95db685..d70f8a2 100755 --- a/lockfree/inc/bipartite_buf.hpp +++ b/lockfree/inc/bipartite_buf.hpp @@ -5,7 +5,7 @@ * microcontrollers to HPC machines. * Lock-free for single consumer single producer scenarios. * @version 1.2.0 - * @date 11. May 2023 + * @date 18. May 2023 * @author Djordje Nedic **************************************************************/ @@ -37,7 +37,7 @@ * This file is part of lockfree * * Author: Djordje Nedic - * Version: v1.0.1 + * Version: v1.0.2 **************************************************************/ /************************** INCLUDE ***************************/ diff --git a/lockfree/inc/bipartite_buf_impl.hpp b/lockfree/inc/bipartite_buf_impl.hpp index 516058c..9fa0ce2 100644 --- a/lockfree/inc/bipartite_buf_impl.hpp +++ b/lockfree/inc/bipartite_buf_impl.hpp @@ -5,7 +5,7 @@ * to HPC machines. Lock-free for single consumer single * producer scenarios. * @version 1.2.0 - * @date 11. May 2023 + * @date 18. May 2023 * @author Djordje Nedic **************************************************************/ @@ -37,7 +37,7 @@ * This file is part of lockfree * * Author: Djordje Nedic - * Version: v1.0.1 + * Version: v1.0.2 **************************************************************/ /************************** INCLUDE ***************************/ diff --git a/lockfree/inc/lockfree.hpp b/lockfree/inc/lockfree.hpp index 4788d66..c5e3f02 100644 --- a/lockfree/inc/lockfree.hpp +++ b/lockfree/inc/lockfree.hpp @@ -3,8 +3,8 @@ * @brief A collection of lock free data structures written in * standard c++11 suitable for all systems, from low-end * microcontrollers to HPC machines. - * @version 1.0.1 - * @date 11. May 2023 + * @version 1.0.2 + * @date 18. May 2023 * @author Djordje Nedic **************************************************************/ @@ -36,7 +36,7 @@ * This file is part of lockfree * * Author: Djordje Nedic - * Version: v1.0.1 + * Version: v1.0.2 **************************************************************/ /************************** DEFINE ****************************/ @@ -51,6 +51,6 @@ /************************** INCLUDE ***************************/ +#include "bipartite_buf.hpp" #include "queue.hpp" #include "ring_buf.hpp" -#include "bipartite_buf.hpp" diff --git a/lockfree/inc/queue.hpp b/lockfree/inc/queue.hpp index a309ec6..2e79b2a 100755 --- a/lockfree/inc/queue.hpp +++ b/lockfree/inc/queue.hpp @@ -4,8 +4,8 @@ * suitable for both low-end microcontrollers all the way * to HPC machines. Lock-free for single consumer single * producer scenarios. - * @version 1.0.1 - * @date 11. May 2023 + * @version 1.0.2 + * @date 18. May 2023 * @author Djordje Nedic **************************************************************/ @@ -37,7 +37,7 @@ * This file is part of lockfree * * Author: Djordje Nedic - * Version: v1.0.1 + * Version: v1.0.2 **************************************************************/ /************************** INCLUDE ***************************/ diff --git a/lockfree/inc/queue_impl.hpp b/lockfree/inc/queue_impl.hpp index 2ebd56d..5979144 100644 --- a/lockfree/inc/queue_impl.hpp +++ b/lockfree/inc/queue_impl.hpp @@ -4,8 +4,8 @@ * suitable for both low-end microcontrollers all the way * to HPC machines. Lock-free for single consumer single * producer scenarios. - * @version 1.0.1 - * @date 11. May 2023 + * @version 1.0.2 + * @date 18. May 2023 * @author Djordje Nedic **************************************************************/ @@ -37,16 +37,14 @@ * This file is part of lockfree * * Author: Djordje Nedic - * Version: v1.0.1 + * Version: v1.0.2 **************************************************************/ /********************** PUBLIC METHODS ************************/ -template -Queue::Queue() : _r(0U), _w(0U) {} +template Queue::Queue() : _r(0U), _w(0U) {} -template -bool Queue::Push(const T &element) { +template bool Queue::Push(const T &element) { /* Preload indexes with adequate memory ordering */ const size_t w = _w.load(std::memory_order_relaxed); const size_t r = _r.load(std::memory_order_acquire); diff --git a/lockfree/inc/ring_buf.hpp b/lockfree/inc/ring_buf.hpp index 547b779..1fb434a 100755 --- a/lockfree/inc/ring_buf.hpp +++ b/lockfree/inc/ring_buf.hpp @@ -4,8 +4,8 @@ * c++11 suitable for both low-end microcontrollers all the way * to HPC machines. Lock-free for single consumer single * producer scenarios. - * @version 1.0.1 - * @date 11. May 2023 + * @version 1.0.2 + * @date 18. May 2023 * @author Djordje Nedic **************************************************************/ @@ -37,7 +37,7 @@ * This file is part of lockfree * * Author: Djordje Nedic - * Version: v1.0.1 + * Version: v1.0.2 **************************************************************/ /************************** INCLUDE ***************************/ diff --git a/lockfree/inc/ring_buf_impl.hpp b/lockfree/inc/ring_buf_impl.hpp index f3f1b60..60aff46 100644 --- a/lockfree/inc/ring_buf_impl.hpp +++ b/lockfree/inc/ring_buf_impl.hpp @@ -4,8 +4,8 @@ * c++11 suitable for both low-end microcontrollers all the way * to HPC machines. Lock-free for single consumer single * producer scenarios. - * @version 1.0.1 - * @date 11. May 2023 + * @version 1.0.2 + * @date 18. May 2023 * @author Djordje Nedic **************************************************************/ @@ -37,7 +37,7 @@ * This file is part of lockfree * * Author: Djordje Nedic - * Version: v1.0.1 + * Version: v1.0.2 **************************************************************/ /********************** PUBLIC METHODS ************************/ @@ -175,7 +175,7 @@ template size_t RingBuf::GetFree() const { template size_t RingBuf::GetAvailable() const { const size_t r = _r.load(std::memory_order_relaxed); - const size_t w = _w.load(std::memory_order_acquire); + const size_t w = _w.load(std::memory_order_acquire); return CalcAvailable(w, r); }