From: Kyle J. McKay Date: Sun, 8 Mar 2015 07:14:37 +0000 (-0800) Subject: thread-utils.c: detect CPU count on older BSD-like systems X-Git-Tag: v2.4.0-rc0~34^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a25b5a32c76630f2433b860fef7bc28a9380a8f6?hp=a25b5a32c76630f2433b860fef7bc28a9380a8f6 thread-utils.c: detect CPU count on older BSD-like systems Not all systems support using sysconf to detect the number of available CPU cores. Older BSD and BSD-derived systems only provide the information via the sysctl function. If HAVE_BSD_SYSCTL is defined attempt to retrieve the number of available CPU cores using the sysctl function. If HAVE_BSD_SYSCTL is not defined or the sysctl function fails, we still attempt to get the information via sysconf. Signed-off-by: Kyle J. McKay Signed-off-by: Junio C Hamano ---