summaryrefslogtreecommitdiffstats
path: root/fastos
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-12-07 21:48:18 +0100
committerGitHub <noreply@github.com>2022-12-07 21:48:18 +0100
commit00a355ee4e6394597ce00ce1e08dc1af3aa94ec7 (patch)
treed202dd4941e9167dac488d71f026f4a5b861eae6 /fastos
parent20e98a1adfaca9a380c7fa5402c993ef5324c4aa (diff)
parentf7637ab409c66573a876bebdcf88151426373fcc (diff)
Merge pull request #25142 from vespa-engine/arnej/always-ignore-requested-stack-size
always ignore requested stack size
Diffstat (limited to 'fastos')
-rw-r--r--fastos/src/vespa/fastos/unix_thread.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/fastos/src/vespa/fastos/unix_thread.cpp b/fastos/src/vespa/fastos/unix_thread.cpp
index aac4c4d189c..f2098cc6345 100644
--- a/fastos/src/vespa/fastos/unix_thread.cpp
+++ b/fastos/src/vespa/fastos/unix_thread.cpp
@@ -37,7 +37,7 @@ bool FastOS_UNIX_Thread::CleanupClass ()
return true;
}
-bool FastOS_UNIX_Thread::Initialize (int stackSize, int stackGuardSize)
+bool FastOS_UNIX_Thread::Initialize (int /*stackSize*/, int stackGuardSize)
{
bool rc=false;
@@ -61,23 +61,8 @@ bool FastOS_UNIX_Thread::Initialize (int stackSize, int stackGuardSize)
if (stackGuardSize != 0) {
pthread_attr_setguardsize(&attr, stackGuardSize);
}
-
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
- size_t adjusted_stack_size = stackSize;
-#ifdef __linux__
- ssize_t stack_needed_by_system = __pthread_get_minstack(&attr);
- adjusted_stack_size += stack_needed_by_system;
-#else
- adjusted_stack_size += PTHREAD_STACK_MIN;
-#endif
- if (getenv("VESPA_IGNORE_REQUESTED_STACK_SIZES") == nullptr) {
- //fprintf(stderr, "pthread_create: using adjusted stack size %zd\n", adjusted_stack_size);
- pthread_attr_setstacksize(&attr, adjusted_stack_size);
- } else {
- //fprintf(stderr, "pthread_create: ignoring requested stack size %d\n", stackSize);
- }
-
rc = (0 == pthread_create(&_handle, &attr, FastOS_ThreadHook, this));
if (rc)
_handleValid = true;