Skip to content
This repository was archived by the owner on Dec 31, 2020. It is now read-only.

Commit a64cc24

Browse files
authored
Use HW_NCPU on FreeBSD as well
1 parent e85d851 commit a64cc24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/nvthread/nvthread.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This code is in the public domain -- Ignacio Castaño <castano@gmail.com>
1+
// This code is in the public domain -- Ignacio Castaño <castano@gmail.com>
22

33
#include "nvthread.h"
44

@@ -98,7 +98,7 @@ uint nv::processorCount() {
9898
// set the mib for hw.ncpu
9999
mib[0] = CTL_HW;
100100

101-
#if NV_OS_OPENBSD
101+
#if NV_OS_OPENBSD || NV_OS_FREEBSD
102102
mib[1] = HW_NCPU;
103103
#else
104104
mib[1] = HW_AVAILCPU;
@@ -329,4 +329,4 @@ uint nv::physicalProcessorCount() {
329329
return processorCount();
330330
}
331331

332-
#endif
332+
#endif

0 commit comments

Comments
 (0)