diff options
author | Arne Juul <arnej@yahooinc.com> | 2022-12-07 10:03:54 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2022-12-07 10:04:01 +0000 |
commit | f7637ab409c66573a876bebdcf88151426373fcc (patch) | |
tree | e0e5f3d7fdbdf1b176e61ff452136bf0254dd4fd /fastos | |
parent | 898582aa193954ee055f5fb5c7b2c643d1fcafdf (diff) |
always ignore requested stack size
Diffstat (limited to 'fastos')
-rw-r--r-- | fastos/src/vespa/fastos/unix_thread.cpp | 17 |
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; |