summaryrefslogtreecommitdiffstats
path: root/openmp/runtime
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2016-09-02 20:35:47 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2016-09-02 20:35:47 +0000
commit9e69696f5ac60793813a37ba93303d5d242bceeb (patch)
tree0a73eb01c5eb0f514789724658c748b6f7a5370e /openmp/runtime
parent6ef32bf2aff1e4ebcf8d8f82b297ab8f28961e2d (diff)
downloadbcm5719-llvm-9e69696f5ac60793813a37ba93303d5d242bceeb.tar.gz
bcm5719-llvm-9e69696f5ac60793813a37ba93303d5d242bceeb.zip
Decouple the kmp_affin_mask_t type from determining if affinity is capable
the __kmp_affinity_determine_capable() functions are highly operating system specific. This change has the functions use the type they expect explicitly. llvm-svn: 280538
Diffstat (limited to 'openmp/runtime')
-rw-r--r--openmp/runtime/src/z_Linux_util.c4
-rw-r--r--openmp/runtime/src/z_Windows_NT_util.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/openmp/runtime/src/z_Linux_util.c b/openmp/runtime/src/z_Linux_util.c
index 5f42d722a42..578159b8f99 100644
--- a/openmp/runtime/src/z_Linux_util.c
+++ b/openmp/runtime/src/z_Linux_util.c
@@ -251,8 +251,8 @@ __kmp_affinity_determine_capable(const char *env_var)
int gCode;
int sCode;
- kmp_affin_mask_t *buf;
- buf = ( kmp_affin_mask_t * ) KMP_INTERNAL_MALLOC( KMP_CPU_SET_SIZE_LIMIT );
+ unsigned char *buf;
+ buf = ( unsigned char * ) KMP_INTERNAL_MALLOC( KMP_CPU_SET_SIZE_LIMIT );
// If Linux* OS:
// If the syscall fails or returns a suggestion for the size,
diff --git a/openmp/runtime/src/z_Windows_NT_util.c b/openmp/runtime/src/z_Windows_NT_util.c
index f3ae0a49b0a..26f91d10766 100644
--- a/openmp/runtime/src/z_Windows_NT_util.c
+++ b/openmp/runtime/src/z_Windows_NT_util.c
@@ -807,9 +807,9 @@ __kmp_affinity_determine_capable( const char *env_var )
//
#if KMP_GROUP_AFFINITY
- KMP_AFFINITY_ENABLE(__kmp_num_proc_groups*sizeof(kmp_affin_mask_t));
+ KMP_AFFINITY_ENABLE(__kmp_num_proc_groups*sizeof(DWORD_PTR));
#else
- KMP_AFFINITY_ENABLE(sizeof(kmp_affin_mask_t));
+ KMP_AFFINITY_ENABLE(sizeof(DWORD_PTR));
#endif
KA_TRACE( 10, (
OpenPOWER on IntegriCloud