summaryrefslogtreecommitdiffstats
path: root/openmp
diff options
context:
space:
mode:
Diffstat (limited to 'openmp')
-rw-r--r--openmp/runtime/src/z_Linux_util.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/openmp/runtime/src/z_Linux_util.c b/openmp/runtime/src/z_Linux_util.c
index 0631ab5b197..8992733d7bb 100644
--- a/openmp/runtime/src/z_Linux_util.c
+++ b/openmp/runtime/src/z_Linux_util.c
@@ -51,7 +51,6 @@
# include <sys/sysctl.h>
# include <mach/mach.h>
#elif KMP_OS_FREEBSD
-# include <sys/sysctl.h>
# include <pthread_np.h>
#endif
@@ -2067,7 +2066,7 @@ __kmp_get_xproc( void ) {
int r = 0;
- #if KMP_OS_LINUX || KMP_OS_NETBSD
+ #if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
r = sysconf( _SC_NPROCESSORS_ONLN );
@@ -2089,16 +2088,6 @@ __kmp_get_xproc( void ) {
KMP_INFORM( AssumedNumCPU );
}; // if
- #elif KMP_OS_FREEBSD
-
- int mib[] = { CTL_HW, HW_NCPU };
- size_t len = sizeof( r );
- if ( sysctl( mib, 2, &r, &len, NULL, 0 ) < 0 ) {
- r = 0;
- KMP_WARNING( CantGetNumAvailCPU );
- KMP_INFORM( AssumedNumCPU );
- }
-
#else
#error "Unknown or unsupported OS."
@@ -2275,7 +2264,7 @@ __kmp_is_address_mapped( void * addr ) {
int found = 0;
int rc;
- #if KMP_OS_LINUX
+ #if KMP_OS_LINUX || KMP_OS_FREEBSD
/*
On Linux* OS, read the /proc/<pid>/maps pseudo-file to get all the address ranges mapped
OpenPOWER on IntegriCloud