From 90361fd36c803c4c5c28d67f05ed66f619e0d39c Mon Sep 17 00:00:00 2001 From: Florian Behrens Date: Wed, 30 Jan 2013 09:20:09 +0100 Subject: Added support for multicore CPUs for INTEGRITY (V10+) target. QThread::idealThreadCount returns now the number of cores. Change-Id: Idc23fc3c257165f6a63c6a7686a57a4fe76f6413 Reviewed-by: Thiago Macieira --- src/corelib/thread/qthread_unix.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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) -- cgit v1.2.3