[Openmp-commits] [openmp] r348885 - [runtime] Use getloadavg() on NetBSD as well

Michal Gorny via Openmp-commits openmp-commits at lists.llvm.org
Tue Dec 11 11:02:09 PST 2018


Author: mgorny
Date: Tue Dec 11 11:02:09 2018
New Revision: 348885

URL: http://llvm.org/viewvc/llvm-project?rev=348885&view=rev
Log:
[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

Modified:
    openmp/trunk/runtime/src/z_Linux_util.cpp

Modified: openmp/trunk/runtime/src/z_Linux_util.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/z_Linux_util.cpp?rev=348885&r1=348884&r2=348885&view=diff
==============================================================================
--- openmp/trunk/runtime/src/z_Linux_util.cpp (original)
+++ openmp/trunk/runtime/src/z_Linux_util.cpp Tue Dec 11 11:02:09 2018
@@ -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




More information about the Openmp-commits mailing list