From dba712acf6148cb7c5b4b1ee6d6749e66c08c414 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 3 Mar 2012 17:31:03 +0100 Subject: [PATCH] query the online, not total, CPUs in case some were shut off --- tools/quake3/common/threads.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/quake3/common/threads.c b/tools/quake3/common/threads.c index 1c8e7e75..b50f6d60 100644 --- a/tools/quake3/common/threads.c +++ b/tools/quake3/common/threads.c @@ -434,8 +434,8 @@ void ThreadSetDefault (void) { if (numthreads == -1) // not set manually { -#ifdef _SC_NPROCESSORS_CONF - long cpus = sysconf(_SC_NPROCESSORS_CONF); +#ifdef _SC_NPROCESSORS_ONLN + long cpus = sysconf(_SC_NPROCESSORS_ONLN); if (cpus > 0) numthreads = cpus; else -- 2.39.2