use correct value for (processor-count) on QNX

This commit is contained in:
Tobias Hammer 2013-05-03 14:20:58 +02:00 committed by Matthew Flatt
parent c3b80bee41
commit e278d43e22

View File

@ -2164,7 +2164,7 @@ Scheme_Object *touch(int argc, Scheme_Object *argv[])
} }
} }
#if defined(linux) #if defined(linux) || defined(__QNX__)
# include <unistd.h> # include <unistd.h>
#elif defined(OS_X) #elif defined(OS_X)
# include <sys/param.h> # include <sys/param.h>
@ -2176,7 +2176,7 @@ Scheme_Object *touch(int argc, Scheme_Object *argv[])
static void init_cpucount(void) static void init_cpucount(void)
/* Called in runtime thread */ /* Called in runtime thread */
{ {
#if defined(linux) #if defined(linux) || defined(__QNX__)
cpucount = sysconf(_SC_NPROCESSORS_ONLN); cpucount = sysconf(_SC_NPROCESSORS_ONLN);
#elif defined(OS_X) #elif defined(OS_X)
size_t size = sizeof(cpucount); size_t size = sizeof(cpucount);