[med-svn] [Git][med-team/readerwriterqueue][master] 10 commits: New upstream version 1.0.7
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Fri Feb 27 16:06:09 GMT 2026
Étienne Mollier pushed to branch master at Debian Med / readerwriterqueue
Commits:
16d63a03 by Étienne Mollier at 2026-02-27T16:51:10+01:00
New upstream version 1.0.7
- - - - -
46e4b529 by Étienne Mollier at 2026-02-27T16:51:10+01:00
Update upstream source from tag 'upstream/1.0.7'
Update to upstream version '1.0.7'
with Debian dir 72dbd9d619b9438ec141f710858bca84482dd6cd
- - - - -
53630a15 by Étienne Mollier at 2026-02-27T16:56:39+01:00
d/clean: new declare files needing cleansing.
- - - - -
15fb5f78 by Étienne Mollier at 2026-02-27T16:57:08+01:00
d/rules: simplify.
Notably remove dh_clean override, since this is handled by d/clean.
- - - - -
fb5b7cae by Étienne Mollier at 2026-02-27T17:00:30+01:00
d/control: declare the package Architecture: any.
This is due to cmake files with architecture dependent content.
- - - - -
b89c6e94 by Étienne Mollier at 2026-02-27T17:03:00+01:00
d/control: drop redundant Priority: optional.
- - - - -
6a607865 by Étienne Mollier at 2026-02-27T17:03:17+01:00
d/control: drop redundant Rules-Requires-Root: no.
- - - - -
a3588ddf by Étienne Mollier at 2026-02-27T17:03:39+01:00
d/control: declare compliance to standards version 4.7.3.
- - - - -
b7ca5ab5 by Étienne Mollier at 2026-02-27T17:04:50+01:00
d/watch: convert to Github uscan template version 5.
- - - - -
138a6eca by Étienne Mollier at 2026-02-27T17:05:32+01:00
d/changelog: ready for upload to unstable.
- - - - -
11 changed files:
- CMakeLists.txt
- atomicops.h
- debian/changelog
- + debian/clean
- debian/control
- debian/rules
- debian/watch
- readerwritercircularbuffer.h
- readerwriterqueue.h
- + readerwriterqueueConfig.cmake.in
- tests/unittests/unittests.cpp
Changes:
=====================================
CMakeLists.txt
=====================================
@@ -1,11 +1,67 @@
cmake_minimum_required(VERSION 3.9)
-project(readerwriterqueue VERSION 1.0.0)
+project(readerwriterqueue VERSION 1.0.7)
include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
add_library(${PROJECT_NAME} INTERFACE)
-target_include_directories(readerwriterqueue INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(readerwriterqueue INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/>
+)
install(FILES atomicops.h readerwriterqueue.h readerwritercircularbuffer.h LICENSE.md
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
+
+install(TARGETS ${PROJECT_NAME}
+ EXPORT ${PROJECT_NAME}Targets
+)
+
+write_basic_package_version_file(
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
+ VERSION
+ ${PROJECT_VERSION}
+ COMPATIBILITY AnyNewerVersion
+ ARCH_INDEPENDENT
+)
+
+configure_package_config_file(${PROJECT_NAME}Config.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
+ INSTALL_DESTINATION
+ ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/
+)
+
+install(EXPORT
+ ${PROJECT_NAME}Targets
+ FILE
+ ${PROJECT_NAME}Targets.cmake
+ NAMESPACE
+ "${PROJECT_NAME}::"
+ DESTINATION
+ ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ COMPONENT
+ Devel
+)
+
+install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
+ DESTINATION
+ ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ COMPONENT
+ Devel
+)
+
+set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
+set(CPACK_PACKAGE_VENDOR "Cameron Desrochers <cameron at moodycamel.com>")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A single-producer, single-consumer lock-free queue for C++.")
+set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
+set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_VENDOR})
+set(CPACK_GENERATOR "RPM;DEB")
+
+include(CPack)
=====================================
atomicops.h
=====================================
@@ -44,8 +44,18 @@
#define AE_UNUSED(x) ((void)x)
// AE_NO_TSAN/AE_TSAN_ANNOTATE_*
+// For GCC
+#if defined(__SANITIZE_THREAD__)
+#define AE_TSAN_IS_ENABLED
+#endif
+// For clang
#if defined(__has_feature)
-#if __has_feature(thread_sanitizer)
+#if __has_feature(thread_sanitizer) && !defined(AE_TSAN_IS_ENABLED)
+#define AE_TSAN_IS_ENABLED
+#endif
+#endif
+
+#ifdef AE_TSAN_IS_ENABLED
#if __cplusplus >= 201703L // inline variables require C++17
namespace moodycamel { inline int ae_tsan_global; }
#define AE_TSAN_ANNOTATE_RELEASE() AnnotateHappensBefore(__FILE__, __LINE__, (void *)(&::moodycamel::ae_tsan_global))
@@ -56,10 +66,11 @@ extern "C" void AnnotateHappensAfter(const char*, int, void*);
#define AE_NO_TSAN __attribute__((no_sanitize("thread")))
#endif
#endif
-#endif
+
#ifndef AE_NO_TSAN
#define AE_NO_TSAN
#endif
+
#ifndef AE_TSAN_ANNOTATE_RELEASE
#define AE_TSAN_ANNOTATE_RELEASE()
#define AE_TSAN_ANNOTATE_ACQUIRE()
=====================================
debian/changelog
=====================================
@@ -1,3 +1,19 @@
+readerwriterqueue (1.0.7-1) unstable; urgency=medium
+
+ * Team upload.
+ * New upstream version 1.0.7
+ * d/clean: new declare files needing cleansing.
+ * d/rules: simplify.
+ Notably remove dh_clean override, since this is handled by d/clean.
+ * d/control: declare the package Architecture: any.
+ This is due to cmake files with architecture dependent content.
+ * d/control: drop redundant Priority: optional.
+ * d/control: drop redundant Rules-Requires-Root: no.
+ * d/control: declare compliance to standards version 4.7.3.
+ * d/watch: convert to Github uscan template version 5.
+
+ -- Étienne Mollier <emollier at debian.org> Fri, 27 Feb 2026 17:05:16 +0100
+
readerwriterqueue (1.0.6-1) unstable; urgency=medium
* Team Upload.
=====================================
debian/clean
=====================================
@@ -0,0 +1,4 @@
+tests/unittests/unittests
+tests/stabtest/stabtest
+tests/stabtest/log.txt
+benchmarks/benchmarks
=====================================
debian/control
=====================================
@@ -1,17 +1,15 @@
Source: readerwriterqueue
Section: devel
-Priority: optional
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
Uploaders: Steffen Moeller <moeller at debian.org>
Build-Depends: debhelper-compat (= 13), cmake
-Standards-Version: 4.6.1
+Standards-Version: 4.7.3
Homepage: https://github.com/cameron314/readerwriterqueue
Vcs-Browser: https://salsa.debian.org/med-team/readerwriterqueue
Vcs-Git: https://salsa.debian.org/med-team/readerwriterqueue.git
-Rules-Requires-Root: no
Package: libreaderwriterqueue-dev
-Architecture: all
+Architecture: any
Section: libdevel
Depends: ${misc:Depends}
Description: single-producer, single-consumer lock-free queue for C++
=====================================
debian/rules
=====================================
@@ -1,11 +1,7 @@
#!/usr/bin/make -f
export DH_VERBOSE = 1
-
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
-#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-
%:
dh $@ --buildsystem=cmake
@@ -19,12 +15,5 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
benchmarks/benchmarks
endif
-override_dh_install:
+execute_before_dh_install:
find debian/ -name "LICENSE.md" -delete
- dh_install
-
-override_dh_auto_clean:
- dh_auto_clean
- rm -f tests/unittests/unittests
- rm -f tests/stabtest/stabtest tests/stabtest/log.txt
- rm -f benchmarks/benchmarks
=====================================
debian/watch
=====================================
@@ -1,4 +1,5 @@
-version=4
-opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%readerwriterqueue-$1.tar.gz%" \
- https://github.com/cameron314/readerwriterqueue/tags \
- (?:.*?/)?v?(\d[\d.]*)\.tar\.gz
+Version: 5
+
+Template: Github
+Project: readerwriterqueue
+Owner: cameron314
=====================================
readerwritercircularbuffer.h
=====================================
@@ -232,6 +232,27 @@ public:
return wait_dequeue_timed(item, std::chrono::duration_cast<std::chrono::microseconds>(timeout).count());
}
+ // Returns a pointer to the next element in the queue (the one that would
+ // be removed next by a call to `try_dequeue` or `try_pop`). If the queue
+ // appears empty at the time the method is called, returns nullptr instead.
+ // Thread-safe when called by consumer thread.
+ inline T* peek()
+ {
+ if (!items->availableApprox())
+ return nullptr;
+ return inner_peek();
+ }
+
+ // Pops the next element from the queue, if there is one.
+ // Thread-safe when called by consumer thread.
+ inline bool try_pop()
+ {
+ if (!items->tryWait())
+ return false;
+ inner_pop();
+ return true;
+ }
+
// Returns a (possibly outdated) snapshot of the total number of elements currently in the buffer.
// Thread-safe.
inline std::size_t size_approx() const
@@ -265,6 +286,18 @@ private:
slots_->signal();
}
+ T* inner_peek()
+ {
+ return reinterpret_cast<T*>(data) + (nextItem & mask);
+ }
+
+ void inner_pop()
+ {
+ std::size_t i = nextItem++;
+ reinterpret_cast<T*>(data)[i & mask].~T();
+ slots_->signal();
+ }
+
template<typename U>
static inline char* align_for(char* ptr)
{
=====================================
readerwriterqueue.h
=====================================
@@ -51,8 +51,8 @@
#ifndef MOODYCAMEL_MAYBE_ALIGN_TO_CACHELINE
#if defined (__APPLE__) && defined (__MACH__) && __cplusplus >= 201703L
// This is required to find out what deployment target we are using
-#include <CoreFoundation/CoreFoundation.h>
-#if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14
+#include <AvailabilityMacros.h>
+#if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || !defined(MAC_OS_X_VERSION_10_14) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14
// C++17 new(size_t, align_val_t) is not backwards-compatible with older versions of macOS, so we can't support over-alignment in this case
#define MOODYCAMEL_MAYBE_ALIGN_TO_CACHELINE
#endif
=====================================
readerwriterqueueConfig.cmake.in
=====================================
@@ -0,0 +1,3 @@
+ at PACKAGE_INIT@
+
+include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME at Targets.cmake)
=====================================
tests/unittests/unittests.cpp
=====================================
@@ -704,9 +704,11 @@ public:
for (int iteration = 0; iteration != 128; ++iteration) { // check there's no problem with mismatch between nominal and allocated capacity
ASSERT_OR_FAIL(q.max_capacity() == 65);
ASSERT_OR_FAIL(q.size_approx() == 0);
+ ASSERT_OR_FAIL(!q.try_pop());
ASSERT_OR_FAIL(q.try_enqueue(0));
ASSERT_OR_FAIL(q.max_capacity() == 65);
ASSERT_OR_FAIL(q.size_approx() == 1);
+ ASSERT_OR_FAIL(*q.peek() == 0);
for (int i = 1; i != 65; ++i)
q.wait_enqueue(i);
ASSERT_OR_FAIL(q.size_approx() == 65);
@@ -749,6 +751,20 @@ public:
}
Foo::reset();
+ {
+ Foo item;
+ for (int i = 0; i != 23 + 32; ++i) {
+ ASSERT_OR_FAIL(q.try_enqueue(Foo()));
+ item = std::move(*q.peek());
+ ASSERT_OR_FAIL(q.try_pop());
+ }
+ ASSERT_OR_FAIL(!q.peek());
+ ASSERT_OR_FAIL(!q.try_pop());
+ ASSERT_OR_FAIL(Foo::destroy_count() == 23 + 32);
+ ASSERT_OR_FAIL(Foo::destroyed_in_order());
+ }
+ Foo::reset();
+
{
Foo item;
for (int i = 0; i != 10; ++i)
@@ -790,7 +806,15 @@ public:
SimpleThread reader([&]() {
int item;
for (int i = 0; i != 1000000; ++i) {
- q.wait_dequeue(item);
+ int* peeked = q.peek();
+ if (peeked) {
+ item = *peeked;
+ if (peeked != q.peek() || !q.try_pop())
+ result = 0;
+ }
+ else {
+ q.wait_dequeue(item);
+ }
if (item != i)
result = 0;
}
View it on GitLab: https://salsa.debian.org/med-team/readerwriterqueue/-/compare/e8d39594a98f9a141e36b3014f3fba44e33f78dc...138a6eca93fe7eb021aacad1fac7a566fc0417a5
--
View it on GitLab: https://salsa.debian.org/med-team/readerwriterqueue/-/compare/e8d39594a98f9a141e36b3014f3fba44e33f78dc...138a6eca93fe7eb021aacad1fac7a566fc0417a5
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260227/9810f7d5/attachment-0001.htm>
More information about the debian-med-commit
mailing list