Drop checks for VxWorks 6.6 in QThread
1. VxWorks 6.* and older are not supported in Qt6 due to C++17 requirement (among multiple other issues). 2. `_WRS_VXWORKS_MAJOR` and `_WRS_VXWORKS_MINOR` are defined in header `version.h` on VxWorks 7, which is not included anywhere, causing `QThread::idealThreadCount()` to always return 1. As a consequence, instance of `QThreadPool` returned by `QThreadPool::globalInstance()` have always only 1 thread. This causes failure of `tst_QEventDispatcher::postEventFromThread` test case. To fix that, remove VxWorks version checking from qthread_unix.cpp. Pick-to: 6.7 Task-number: QTBUG-115777 Change-Id: I08ffc4acdb74d13dd822402407a71f5916603440 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 8fec93e9a7bf3f8cb80aafb1e2329d998552fbcc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
1603373bc0
commit
3c494d4e40
@ -43,11 +43,8 @@
|
|||||||
# include <sys/sysctl.h>
|
# include <sys/sysctl.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_VXWORKS
|
#ifdef Q_OS_VXWORKS
|
||||||
# if (_WRS_VXWORKS_MAJOR > 6) || ((_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR >= 6))
|
# include <vxCpuLib.h>
|
||||||
# include <vxCpuLib.h>
|
# include <cpuset.h>
|
||||||
# include <cpuset.h>
|
|
||||||
# define QT_VXWORKS_HAS_CPUSET
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_HPUX
|
#ifdef Q_OS_HPUX
|
||||||
@ -466,8 +463,6 @@ int QThread::idealThreadCount() noexcept
|
|||||||
// as of aug 2008 Integrity only supports one single core CPU
|
// as of aug 2008 Integrity only supports one single core CPU
|
||||||
cores = 1;
|
cores = 1;
|
||||||
#elif defined(Q_OS_VXWORKS)
|
#elif defined(Q_OS_VXWORKS)
|
||||||
// VxWorks
|
|
||||||
# if defined(QT_VXWORKS_HAS_CPUSET)
|
|
||||||
cpuset_t cpus = vxCpuEnabledGet();
|
cpuset_t cpus = vxCpuEnabledGet();
|
||||||
cores = 0;
|
cores = 0;
|
||||||
|
|
||||||
@ -478,10 +473,6 @@ int QThread::idealThreadCount() noexcept
|
|||||||
cores++;
|
cores++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# else
|
|
||||||
// as of aug 2008 VxWorks < 6.6 only supports one single core CPU
|
|
||||||
cores = 1;
|
|
||||||
# endif
|
|
||||||
#elif defined(Q_OS_WASM)
|
#elif defined(Q_OS_WASM)
|
||||||
cores = QThreadPrivate::idealThreadCount;
|
cores = QThreadPrivate::idealThreadCount;
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user