diff options
author | Florian Behrens <flb@zuehlke.com> | 2013-01-29 22:48:11 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-09 08:46:09 (GMT) |
commit | 6dad265e22353d7d9fef00f8d7d41be6c8c21e1a (patch) | |
tree | f2c8302e047593eee011faca6a290694c3d870da /src/corelib/thread | |
parent | cbdd21927ef525a7037087c8cd9dbc0736298e17 (diff) | |
download | Qt-6dad265e22353d7d9fef00f8d7d41be6c8c21e1a.zip Qt-6dad265e22353d7d9fef00f8d7d41be6c8c21e1a.tar.gz Qt-6dad265e22353d7d9fef00f8d7d41be6c8c21e1a.tar.bz2 |
Added support for multicore CPUs in QThread::idealThreadCount for INTEGRITY target.
Cherry-picked from qt5 commit 90361fd36c803c4c5c28d67f05ed66f619e0d39c.
Change-Id: If13954d40d07aebf08b9a143964038c0996c325f
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 22e5297..d66d7ec 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -427,7 +427,13 @@ int QThread::idealThreadCount() // IRIX cores = (int)sysconf(_SC_NPROC_ONLN); #elif defined(Q_OS_INTEGRITY) - // as of aug 2008 Integrity only supports one single core CPU +#if (__INTEGRITY_MAJOR_VERSION >= 10) + // Integrity V10+ does support multicore CPUs + Value processorCount; + if (GetProcessorCount(CurrentTask(), &processorCount) == 0) + cores = processorCount; + else +#endif cores = 1; #elif defined(Q_OS_VXWORKS) // VxWorks |