summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFlorian Behrens <flb@zuehlke.com>2013-01-30 09:20:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-30 18:53:58 +0100
commit90361fd36c803c4c5c28d67f05ed66f619e0d39c (patch)
treeb8837bab24eaccdf573bc6f901e215c9784ddce0 /src/corelib
parent2f854e50908c342fddb17d6e72b7fb186f9c46de (diff)
Added support for multicore CPUs for INTEGRITY (V10+) target.
QThread::idealThreadCount returns now the number of cores. Change-Id: Idc23fc3c257165f6a63c6a7686a57a4fe76f6413 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/thread/qthread_unix.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 253f3c79e7..f7397dd8d4 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -415,6 +415,13 @@ int QThread::idealThreadCount() Q_DECL_NOTHROW
// IRIX
cores = (int)sysconf(_SC_NPROC_ONLN);
#elif defined(Q_OS_INTEGRITY)
+#if (__INTEGRITY_MAJOR_VERSION >= 10)
+ // Integrity V10+ does support multicore CPUs
+ Value processorCount;
+ if (GetProcessorCount(CurrentTask(), &processorCount) == 0)
+ cores = processorCount;
+ else
+#endif
// as of aug 2008 Integrity only supports one single core CPU
cores = 1;
#elif defined(Q_OS_VXWORKS)