aports/community/blender/0002-increase-thread-stack-size-for-musl.patch
2023-11-17 19:58:53 +00:00

50 lines
1.4 KiB
Diff

From 67ce33c933f6b7d0c812804c27313f7f8aec57b5 Mon Sep 17 00:00:00 2001
From: Damian Kurek <starfire24680@gmail.com>
Date: Wed, 29 Mar 2023 17:24:22 +0200
Subject: [PATCH 2/3] increase thread stack size for musl
take the apple route to set stack size to 2mb.
---
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 c361bee..ce761b9 100644
--- a/intern/cycles/util/thread.cpp
+++ b/intern/cycles/util/thread.cpp
@@ -13,7 +13,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. */
@@ -43,7 +43,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 35ee013..21a6732 100644
--- a/intern/cycles/util/thread.h
+++ b/intern/cycles/util/thread.h
@@ -43,7 +43,7 @@ class thread {
protected:
function<void()> run_cb_;
-#ifdef __APPLE__
+#if 1
pthread_t pthread_id;
#else
std::thread std_thread;
--
2.42.1