-
Ian Romanick authored
A similar path can be used on at least FreeBSD using cpuset_getaffinity. This is how Ninja determines the number of available CPUs on that platform. See the GetProcessorCount function in util.cc: https://github.com/ninja-build/ninja/blob/master/src/util.cc v2: Fix counting the number of available CPUs. The CPU_COUNT API does not work the way I thought it did.
🤦 Noticed by Marek. Reviewed-by: Adam Jackson <ajax@redhat.com> [v1] Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> [v1] Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!11228>70c9726e