diff options
| author | Rene Ladan <rene@FreeBSD.org> | 2021-09-11 16:57:58 +0200 |
|---|---|---|
| committer | Rene Ladan <rene@FreeBSD.org> | 2021-09-30 23:23:30 +0200 |
| commit | 620968a43a5f9bb3fa98ab20f257a4c0d864caa7 (patch) | |
| tree | 09bef799707f4b6e715b912429bd3b73c1addf4c /cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp | |
| parent | security/vuxml: add www/chromium < 94.0.4606.71 (diff) | |
cleanup: drop support for EOL FreeBSD 11.X
Search criteria used:
- 11.4
- OSREL*
- OSVER*
- *_FreeBSD_11
Input from:
- adridg: devel/qca-legacy
- jbeich: _WITH_DPRINTF, _WITH_GETLINE, GNU bfd workarounds
- sunpoet: security/p5-*OpenSSL*
Reviewed by: doceng, kde, multimedia, perl, python, ruby, rust
Differential Revision: https://reviews.freebsd.org/D32008
Test Plan: make index
Diffstat (limited to 'cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp')
| -rw-r--r-- | cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp b/cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp deleted file mode 100644 index 23d0e75df413..000000000000 --- a/cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp +++ /dev/null @@ -1,45 +0,0 @@ -Note that this patch may be removed after FreeBSD 11.x EoL -as latest FreeBSD versions have proper -pthread_setname_np/pthread_getname_np support. - ---- src/libslic3r/Thread.cpp.orig 2021-07-16 10:14:03 UTC -+++ src/libslic3r/Thread.cpp -@@ -9,10 +9,10 @@ - #include <atomic> - #include <condition_variable> - #include <mutex> -+#include <thread> -+#include <tbb/global_control.h> - #include <tbb/parallel_for.h> --#include <tbb/tbb_thread.h> - #include <tbb/task_arena.h> --#include <tbb/task_scheduler_init.h> - - #include "Thread.hpp" - -@@ -206,13 +206,13 @@ void name_tbb_thread_pool_threads() - nthreads = 1; - #endif - -- if (nthreads != nthreads_hw) -- new tbb::task_scheduler_init(int(nthreads)); -+ if (nthreads != nthreads_hw) -+ tbb::global_control(tbb::global_control::max_allowed_parallelism, nthreads); - - std::atomic<size_t> nthreads_running(0); - std::condition_variable cv; - std::mutex cv_m; -- auto master_thread_id = tbb::this_tbb_thread::get_id(); -+ auto master_thread_id = std::this_thread::get_id(); - tbb::parallel_for( - tbb::blocked_range<size_t>(0, nthreads, 1), - [&nthreads_running, nthreads, &master_thread_id, &cv, &cv_m](const tbb::blocked_range<size_t> &range) { -@@ -226,7 +226,7 @@ void name_tbb_thread_pool_threads() - std::unique_lock<std::mutex> lk(cv_m); - cv.wait(lk, [&nthreads_running, nthreads]{return nthreads_running == nthreads;}); - } -- auto thread_id = tbb::this_tbb_thread::get_id(); -+ auto thread_id = std::this_thread::get_id(); - if (thread_id == master_thread_id) { - // The calling thread runs the 0'th task. - assert(range.begin() == 0); |
