aboutsummaryrefslogtreecommitdiff
path: root/openmp
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2018-12-11 19:02:09 +0000
committerMichal Gorny <mgorny@gentoo.org>2018-12-11 19:02:09 +0000
commit70cdd83cd6c05c730caeed7ea38c39f880053f8e (patch)
treef34ad2b9cafb3a93f2f2aca84a8cf3236820428d /openmp
parent37a22ea063625e28c931eae38653356d9849ae01 (diff)
[runtime] Use getloadavg() on NetBSD as well
Switch NetBSD from reading /proc (which is broken) to getloadavg() (which is already used by Darwin). NetBSD discourages using procfs in favor of system API calls. Differential Revision: https://reviews.llvm.org/D55486 llvm-svn: 348885
Diffstat (limited to 'openmp')
-rw-r--r--openmp/runtime/src/z_Linux_util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp
index 283a20517e78..c2f37eb7bae9 100644
--- a/openmp/runtime/src/z_Linux_util.cpp
+++ b/openmp/runtime/src/z_Linux_util.cpp
@@ -2065,7 +2065,7 @@ int __kmp_is_address_mapped(void *addr) {
#ifdef USE_LOAD_BALANCE
-#if KMP_OS_DARWIN
+#if KMP_OS_DARWIN || KMP_OS_NETBSD
// The function returns the rounded value of the system load average
// during given time interval which depends on the value of