Use HW_NCPU on FreeBSD as well
This commit is contained in:
parent
e85d851cd9
commit
a64cc24169
@ -1,4 +1,4 @@
|
|||||||
// This code is in the public domain -- Ignacio Castaño <castano@gmail.com>
|
// This code is in the public domain -- Ignacio Castaño <castano@gmail.com>
|
||||||
|
|
||||||
#include "nvthread.h"
|
#include "nvthread.h"
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ uint nv::processorCount() {
|
|||||||
// set the mib for hw.ncpu
|
// set the mib for hw.ncpu
|
||||||
mib[0] = CTL_HW;
|
mib[0] = CTL_HW;
|
||||||
|
|
||||||
#if NV_OS_OPENBSD
|
#if NV_OS_OPENBSD || NV_OS_FREEBSD
|
||||||
mib[1] = HW_NCPU;
|
mib[1] = HW_NCPU;
|
||||||
#else
|
#else
|
||||||
mib[1] = HW_AVAILCPU;
|
mib[1] = HW_AVAILCPU;
|
||||||
@ -329,4 +329,4 @@ uint nv::physicalProcessorCount() {
|
|||||||
return processorCount();
|
return processorCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user