about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorSebastien Marie <semarie@kapouay.eu.org>2023-12-30 09:34:02 +0000
committerSebastien Marie <semarie@kapouay.eu.org>2023-12-30 09:34:02 +0000
commit3633f8ba1cc5d1853e2768e5a9516574ed7d31e1 (patch)
tree9418513efed8cbe6b7f6b4177361027be3e3c4e0 /compiler/rustc_codegen_llvm/src/errors.rs
parentfe2cfd45055abfde24cb372a311095c105265236 (diff)
downloadrust-3633f8ba1cc5d1853e2768e5a9516574ed7d31e1.tar.gz
rust-3633f8ba1cc5d1853e2768e5a9516574ed7d31e1.zip
openbsd: available_parallelism: use the right API
use the standard sysconf(_SC_NPROCESSORS_ONLN) way to get the number of 
available processors (capable of running processes), and fallback to 
sysctl([CTL_HW, HW_NCPU]) (number of CPUs configured) only on error.

it permits to differenciate CPUs online vs CPUs configured (and not necessary 
capable of running processes).

while here, use the common code path for BSDs for doing that, and avoid code 
duplication.

Problem initially reported to me by Jiri Navratil.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions