Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openbsd: available_parallelism: use the right API #119436

Merged
merged 1 commit into from
Dec 30, 2023

Commits on Dec 30, 2023

  1. 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.
    semarie committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    3633f8b View commit details
    Browse the repository at this point in the history