summaryrefslogtreecommitdiff
path: root/gnu/packages/cpp.scm
diff options
context:
space:
mode:
authorbdunahu <bdunahu@operationnull.com>2026-06-08 22:08:12 -0400
committerSughosha <sughosha@disroot.org>2026-06-09 20:56:32 +0530
commitabd30b514e1dc3e7e56554256f441e4370de6bc8 (patch)
treea48dba954b51294cda0e6e395cc3d9cda9d2d2b1 /gnu/packages/cpp.scm
parentd734f5ca7053495603614dac22fd1e237ca5bf29 (diff)
gnu: Add readerwriterqueue.
* gnu/packages/cpp.scm (readerwriterqueue): New variable. Change-Id: I63d3f16e97905882bd2908d12609569e0258d465 Signed-off-by: Sughosha <sughosha@disroot.org>
Diffstat (limited to 'gnu/packages/cpp.scm')
-rw-r--r--gnu/packages/cpp.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 1c3b56b9f85..3df28864467 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2128,6 +2128,50 @@ its own version of the tool, this is a fork that aims to be more responsive
2128and make @code{cpplint} usable in wider contexts.") 2128and make @code{cpplint} usable in wider contexts.")
2129 (license license:bsd-3))) 2129 (license license:bsd-3)))
2130 2130
2131(define-public readerwriterqueue
2132 (package
2133 (name "readerwriterqueue")
2134 (version "1.0.7")
2135 (source
2136 (origin
2137 (method git-fetch)
2138 (uri (git-reference
2139 (url "https://github.com/cameron314/readerwriterqueue")
2140 (commit (string-append "v" version))))
2141 (file-name (git-file-name name version))
2142 (sha256
2143 (base32
2144 "0dy77avwfcidxhzj249b1qfg0m86fzz624gi62ddpvm0dmds0h0m"))))
2145 (build-system cmake-build-system)
2146 (arguments
2147 (list
2148 #:tests? #f ;no make instructions
2149 #:phases
2150 #~(modify-phases %standard-phases
2151 (add-after 'unpack 'keep-license-out-of-include-dir
2152 (lambda _
2153 (substitute* "CMakeLists.txt"
2154 (("(readerwritercircularbuffer\\.h )LICENSE.md" _ f) f)))))))
2155 (home-page "https://github.com/cameron314/readerwriterqueue")
2156 (synopsis "Fast single-producer single-consumer lock free queue")
2157 (description "readerwriterqueue provides a lock free queue supporting
2158a two-thread use case (one consuming, one producing). Features include:
2159@itemize
2160@item compatible with C++11 (supports moving objects instead of making copies)
2161@item fully generic (templated container of any type); just like
2162@code{std::queue}, you never need to allocate memory for elements yourself
2163@item allocates memory up front, in contiguous blocks
2164@item provides a @code{try_enqueue} method which is guaranteed never to allocate
2165memory
2166@item provides an enqueue method which can dynamically grow the size of the
2167queue as needed
2168@item Completely wait-free (no compare-and-swap loop). Enqueue and dequeue are
2169always O(1) (not counting memory allocation)
2170@item On x86, the memory barriers compile down to no-ops
2171@end itemize")
2172 (license (list license:bsd-2
2173 license:zlib)))) ;embedded in atomicops.h
2174
2131(define-public reproc 2175(define-public reproc
2132 (package 2176 (package
2133 (name "reproc") 2177 (name "reproc")