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>
This commit is contained in:
parent
2f854e5090
commit
90361fd36c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user