mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
util: Trivial cleanup in the BSD code of util_cpu_detect_once
This code is going to be replicated in future commits, so tidy up a bit first. Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11228>
This commit is contained in:
parent
1786e847d9
commit
44246892a0
1 changed files with 3 additions and 6 deletions
|
|
@ -571,13 +571,10 @@ util_cpu_detect_once(void)
|
|||
util_cpu_caps.nr_cpus = 1;
|
||||
# elif defined(PIPE_OS_BSD)
|
||||
{
|
||||
int mib[2], ncpu;
|
||||
int len;
|
||||
const int mib[] = { CTL_HW, HW_NCPU };
|
||||
int ncpu;
|
||||
int len = sizeof(ncpu);
|
||||
|
||||
mib[0] = CTL_HW;
|
||||
mib[1] = HW_NCPU;
|
||||
|
||||
len = sizeof (ncpu);
|
||||
sysctl(mib, 2, &ncpu, &len, NULL, 0);
|
||||
util_cpu_caps.nr_cpus = ncpu;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue