void-packages/srcpkgs/qt5/patches/0031-qtscript-threading-sta...

32 lines
1.4 KiB
Diff
Raw Normal View History

--- qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/ThreadingPthreads.cpp.orig 2018-10-07 21:27:22.340218063 +0200
+++ qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/ThreadingPthreads.cpp 2018-10-07 21:29:30.743224688 +0200
@@ -168,8 +168,12 @@
ThreadData* threadData = new ThreadData();
threadData->entryPoint = entryPoint;
threadData->arg = data;
-
- if (pthread_create(&threadHandle, 0, runThreadWithRegistration, static_cast<void*>(threadData))) {
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+#if !defined(__GLIBC__)
+ pthread_attr_setstacksize(&attr, 2 * 1024 * 1024);
+#endif
+ if (pthread_create(&threadHandle, &attr, runThreadWithRegistration, static_cast<void*>(threadData))) {
LOG_ERROR("Failed to create pthread at entry point %p with data %p", entryPoint, data);
delete threadData;
return 0;
@@ -180,7 +184,12 @@
ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*)
{
pthread_t threadHandle;
- if (pthread_create(&threadHandle, 0, entryPoint, data)) {
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+#if !defined(__GLIBC__)
+ pthread_attr_setstacksize(&attr, 2 * 1024 * 1024);
+#endif
+ if (pthread_create(&threadHandle, &attr, entryPoint, data)) {
LOG_ERROR("Failed to create pthread at entry point %p with data %p", entryPoint, data);
return 0;
}