1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 02:05:16 +03:00
aports/community/blender/0002-increase-thread-stack-size-for-musl.patch
2022-12-23 16:45:12 +01:00

50 lines
1.4 KiB
Diff

take the apple route to set stack size to 2mb.
--
From 18859ed7e25090c4524ac299d41fe8c5cd5c368b Mon Sep 17 00:00:00 2001
From: Damian Kurek <starfire24680@gmail.com>
Date: Fri, 3 Dec 2021 17:55:35 +0000
Subject: [PATCH 2/2] increase thread stack size for musl
---
intern/cycles/util/thread.cpp | 4 ++--
intern/cycles/util/thread.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/intern/cycles/util/thread.cpp b/intern/cycles/util/thread.cpp
index f4949aa..6056db8 100644
--- a/intern/cycles/util/thread.cpp
+++ b/intern/cycles/util/thread.cpp
@@ -10,7 +10,7 @@ CCL_NAMESPACE_BEGIN
thread::thread(function<void()> run_cb) : run_cb_(run_cb), joined_(false)
{
-#ifdef __APPLE__
+#if 1
/* Set the stack size to 2MB to match Linux. The default 512KB on macOS is
* too small for Embree, and consistent stack size also makes things more
* predictable in general. */
@@ -40,7 +40,7 @@ void *thread::run(void *arg)
bool thread::join()
{
joined_ = true;
-#ifdef __APPLE__
+#if 1
return pthread_join(pthread_id, NULL) == 0;
#else
try {
diff --git a/intern/cycles/util/thread.h b/intern/cycles/util/thread.h
index 8d7dc45..f3040cf 100644
--- a/intern/cycles/util/thread.h
+++ b/intern/cycles/util/thread.h
@@ -41,7 +41,7 @@ class thread {
protected:
function<void()> run_cb_;
-#ifdef __APPLE__
+#if 1
pthread_t pthread_id;
#else
std::thread std_thread;
--
2.38.1