From 248e81a28028b1b0570ffe0ed2e0edbf63a0a21c Mon Sep 17 00:00:00 2001 From: Mikhail Svetkin Date: Thu, 6 Jun 2019 10:42:22 +0200 Subject: rtems: Add environment variable for configure default thread stack size The default stack size is too small on RTEMS. Qt uses threads internally and there is no way to change their stack size. Change-Id: I94a42c7a70c745f0b50d7051d9320edfabd1e09e Reviewed-by: Volker Hilsheimer --- src/corelib/thread/qthread.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index fe555afca7..280c785049 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -171,6 +171,11 @@ QThreadPrivate::QThreadPrivate(QThreadData *d) // to 128K. #ifdef Q_OS_INTEGRITY stackSize = 128 * 1024; +#elif defined(Q_OS_RTEMS) + static bool envStackSizeOk = false; + static const int envStackSize = qEnvironmentVariableIntValue("QT_DEFAULT_THREAD_STACK_SIZE", &envStackSizeOk); + if (envStackSizeOk) + stackSize = envStackSize; #endif #if defined (Q_OS_WIN) -- cgit v1.2.3