From 491303ecdc7de6e7034ce473b29fcda2f427b76b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 27 Apr 2020 16:28:36 +0200 Subject: [PATCH] Update the test-thread-monitor patch to use std::atomic tbb::atomic is deprecated and the build otherwise fails with clang. --- tbb-2019-test-thread-monitor.patch | 27 ++++++++++++++++++--------- tbb.spec | 6 +++++- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/tbb-2019-test-thread-monitor.patch b/tbb-2019-test-thread-monitor.patch index 27d6a19..e2eee87 100644 --- a/tbb-2019-test-thread-monitor.patch +++ b/tbb-2019-test-thread-monitor.patch @@ -1,6 +1,14 @@ ---- tbb-2019_U8/src/rml/test/test_thread_monitor.cpp.orig 2019-06-06 04:29:15.000000000 -0600 -+++ tbb-2019_U8/src/rml/test/test_thread_monitor.cpp 2019-08-27 11:36:44.253575223 -0600 -@@ -33,21 +33,21 @@ public: +--- tbb-2020.2/oneTBB-2020.2/src/rml/test/test_thread_monitor.cpp 2020-03-30 13:38:06.000000000 +0200 ++++ oneTBB-2020.2/src/rml/test/test_thread_monitor.cpp 2020-04-27 15:43:34.209452298 +0200 +@@ -23,6 +23,7 @@ + #include "thread_monitor.h" + #include "harness_memory.h" + #include "tbb/semaphore.cpp" ++#include + + class ThreadState { + void loop(); +@@ -33,21 +34,21 @@ } typedef rml::internal::thread_monitor thread_monitor; thread_monitor monitor; @@ -8,9 +16,9 @@ - volatile int ack; - volatile unsigned clock; - volatile unsigned stamp; -+ tbb::atomic request; -+ tbb::atomic ack; -+ tbb::atomic clock; ++ std::atomic request; ++ std::atomic ack; ++ std::atomic clock; + unsigned stamp; ThreadState() : request(-1), ack(-1), clock(0) {} }; @@ -22,12 +30,13 @@ thread_monitor::cookie c; monitor.prepare_wait(c); if( ack==request ) { - REMARK("%p: request=%d ack=%d\n", this, request, ack ); +- REMARK("%p: request=%d ack=%d\n", this, request, ack ); ++ REMARK("%p: request=%d ack=%d\n", this, request.load(), ack.load() ); + ++clock; monitor.commit_wait(c); } else monitor.cancel_wait(); -@@ -60,7 +60,7 @@ void ThreadState::loop() { +@@ -60,7 +61,7 @@ rml::internal::thread_monitor::yield(); } int r = request; @@ -36,7 +45,7 @@ if( !r ) return; } } -@@ -89,7 +89,7 @@ int TestMain () { +@@ -89,7 +90,7 @@ REPORT("Warning: thread %d not waiting\n",i); break; } diff --git a/tbb.spec b/tbb.spec index 4c57ad8..d7b9f6d 100644 --- a/tbb.spec +++ b/tbb.spec @@ -1,7 +1,7 @@ Name: tbb Summary: The Threading Building Blocks library abstracts low-level threading details Version: 2020.2 -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 URL: http://threadingbuildingblocks.org/ @@ -197,6 +197,10 @@ rm $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}/README.rst %{python3_sitearch}/__pycache__/TBB* %changelog +* Mon Apr 27 2020 Timm Baeder - 2020.2-2 +- Pass the compiler to when building +- Update the tbb-2019-test-thread-monitor.patch to use std::atomic + * Tue Mar 31 2020 Jerry James - 2020.2-1 - Rebase to version 2020.2