Commit f5382cab authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Set number of CPUs on QNX.

parent 4372ce8a
...@@ -57,6 +57,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -57,6 +57,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "TargetConditionals.h" #include "TargetConditionals.h"
#endif #endif
#ifdef __QNX__
#include <sys/syspage.h>
#endif
#ifdef ANDROID #ifdef ANDROID
#include <android/log.h> #include <android/log.h>
#endif #endif
...@@ -510,6 +514,8 @@ void ms_base_init(){ ...@@ -510,6 +514,8 @@ void ms_base_init(){
num_cpu = sysinfo.dwNumberOfProcessors; num_cpu = sysinfo.dwNumberOfProcessors;
#elif __APPLE__ || __linux #elif __APPLE__ || __linux
num_cpu = sysconf( _SC_NPROCESSORS_ONLN ); num_cpu = sysconf( _SC_NPROCESSORS_ONLN );
#elif __QNX__
num_cpu = _syspage_ptr->num_cpu;
#else #else
#warning "There is no code that detects the number of CPU for this platform." #warning "There is no code that detects the number of CPU for this platform."
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment