summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/z_Linux_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/z_Linux_util.c')
-rw-r--r--openmp/runtime/src/z_Linux_util.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/openmp/runtime/src/z_Linux_util.c b/openmp/runtime/src/z_Linux_util.c
index c419edb9802..0631ab5b197 100644
--- a/openmp/runtime/src/z_Linux_util.c
+++ b/openmp/runtime/src/z_Linux_util.c
@@ -22,7 +22,7 @@
#include "kmp_stats.h"
#include "kmp_wait_release.h"
-#if !KMP_OS_FREEBSD
+#if !KMP_OS_FREEBSD && !KMP_OS_NETBSD
# include <alloca.h>
#endif
#include <unistd.h>
@@ -622,7 +622,7 @@ static kmp_int32
__kmp_set_stack_info( int gtid, kmp_info_t *th )
{
int stack_data;
-#if KMP_OS_LINUX || KMP_OS_FREEBSD
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
/* Linux* OS only -- no pthread_getattr_np support on OS X* */
pthread_attr_t attr;
int status;
@@ -637,7 +637,7 @@ __kmp_set_stack_info( int gtid, kmp_info_t *th )
/* Fetch the real thread attributes */
status = pthread_attr_init( &attr );
KMP_CHECK_SYSFAIL( "pthread_attr_init", status );
-#if KMP_OS_FREEBSD
+#if KMP_OS_FREEBSD || KMP_OS_NETBSD
status = pthread_attr_get_np( pthread_self(), &attr );
KMP_CHECK_SYSFAIL( "pthread_attr_get_np", status );
#else
@@ -661,7 +661,7 @@ __kmp_set_stack_info( int gtid, kmp_info_t *th )
TCW_4(th->th.th_info.ds.ds_stackgrow, FALSE);
return TRUE;
}
-#endif /* KMP_OS_LINUX || KMP_OS_FREEBSD */
+#endif /* KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD */
/* Use incremental refinement starting from initial conservative estimate */
TCW_PTR(th->th.th_info.ds.ds_stacksize, 0);
TCW_PTR(th -> th.th_info.ds.ds_stackbase, &stack_data);
@@ -677,7 +677,7 @@ __kmp_launch_worker( void *thr )
sigset_t new_set, old_set;
#endif /* KMP_BLOCK_SIGNALS */
void *exit_val;
-#if KMP_OS_LINUX || KMP_OS_FREEBSD
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
void * volatile padding = 0;
#endif
int gtid;
@@ -725,7 +725,7 @@ __kmp_launch_worker( void *thr )
KMP_CHECK_SYSFAIL( "pthread_sigmask", status );
#endif /* KMP_BLOCK_SIGNALS */
-#if KMP_OS_LINUX || KMP_OS_FREEBSD
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
if ( __kmp_stkoffset > 0 && gtid > 0 ) {
padding = KMP_ALLOCA( gtid * __kmp_stkoffset );
}
@@ -2067,7 +2067,7 @@ __kmp_get_xproc( void ) {
int r = 0;
- #if KMP_OS_LINUX
+ #if KMP_OS_LINUX || KMP_OS_NETBSD
r = sysconf( _SC_NPROCESSORS_ONLN );
@@ -2338,9 +2338,9 @@ __kmp_is_address_mapped( void * addr ) {
found = 1;
}; // if
- #elif KMP_OS_FREEBSD
+ #elif KMP_OS_FREEBSD || KMP_OS_NETBSD
- // FIXME(FreeBSD*): Implement this
+ // FIXME(FreeBSD, NetBSD): Implement this
found = 1;
#else
OpenPOWER on IntegriCloud