Skip to content

Commit

Permalink
Release 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
DNedic committed May 18, 2023
1 parent af34edc commit 758256f
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 26 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)

project(lockfree
VERSION 1.0.1
VERSION 1.0.2
LANGUAGES CXX
)

Expand Down
4 changes: 2 additions & 2 deletions lockfree/inc/bipartite_buf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
**************************************************************/

Expand Down Expand Up @@ -37,7 +37,7 @@
* This file is part of lockfree
*
* Author: Djordje Nedic <[email protected]>
* Version: v1.0.1
* Version: v1.0.2
**************************************************************/

/************************** INCLUDE ***************************/
Expand Down
4 changes: 2 additions & 2 deletions lockfree/inc/bipartite_buf_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
**************************************************************/

Expand Down Expand Up @@ -37,7 +37,7 @@
* This file is part of lockfree
*
* Author: Djordje Nedic <[email protected]>
* Version: v1.0.1
* Version: v1.0.2
**************************************************************/

/************************** INCLUDE ***************************/
Expand Down
8 changes: 4 additions & 4 deletions lockfree/inc/lockfree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
**************************************************************/

Expand Down Expand Up @@ -36,7 +36,7 @@
* This file is part of lockfree
*
* Author: Djordje Nedic <[email protected]>
* Version: v1.0.1
* Version: v1.0.2
**************************************************************/

/************************** DEFINE ****************************/
Expand All @@ -51,6 +51,6 @@

/************************** INCLUDE ***************************/

#include "bipartite_buf.hpp"
#include "queue.hpp"
#include "ring_buf.hpp"
#include "bipartite_buf.hpp"
6 changes: 3 additions & 3 deletions lockfree/inc/queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
**************************************************************/

Expand Down Expand Up @@ -37,7 +37,7 @@
* This file is part of lockfree
*
* Author: Djordje Nedic <[email protected]>
* Version: v1.0.1
* Version: v1.0.2
**************************************************************/

/************************** INCLUDE ***************************/
Expand Down
12 changes: 5 additions & 7 deletions lockfree/inc/queue_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
**************************************************************/

Expand Down Expand Up @@ -37,16 +37,14 @@
* This file is part of lockfree
*
* Author: Djordje Nedic <[email protected]>
* Version: v1.0.1
* Version: v1.0.2
**************************************************************/

/********************** PUBLIC METHODS ************************/

template <typename T, size_t size>
Queue<T, size>::Queue() : _r(0U), _w(0U) {}
template <typename T, size_t size> Queue<T, size>::Queue() : _r(0U), _w(0U) {}

template <typename T, size_t size>
bool Queue<T, size>::Push(const T &element) {
template <typename T, size_t size> bool Queue<T, size>::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);
Expand Down
6 changes: 3 additions & 3 deletions lockfree/inc/ring_buf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
**************************************************************/

Expand Down Expand Up @@ -37,7 +37,7 @@
* This file is part of lockfree
*
* Author: Djordje Nedic <[email protected]>
* Version: v1.0.1
* Version: v1.0.2
**************************************************************/

/************************** INCLUDE ***************************/
Expand Down
8 changes: 4 additions & 4 deletions lockfree/inc/ring_buf_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
**************************************************************/

Expand Down Expand Up @@ -37,7 +37,7 @@
* This file is part of lockfree
*
* Author: Djordje Nedic <[email protected]>
* Version: v1.0.1
* Version: v1.0.2
**************************************************************/

/********************** PUBLIC METHODS ************************/
Expand Down Expand Up @@ -175,7 +175,7 @@ template <typename T, size_t size> size_t RingBuf<T, size>::GetFree() const {
template <typename T, size_t size>
size_t RingBuf<T, size>::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);
}
Expand Down

0 comments on commit 758256f

Please sign in to comment.