diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2017-03-20 22:04:02 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2017-03-20 22:04:02 +0000 |
commit | 16fd8fec76129351e053ed5bf64a0f972b48dcb3 (patch) | |
tree | 6735ce042d8fbe1d27b9c16907241e0066e12dc7 /openmp/runtime/src/kmp_affinity.cpp | |
parent | 6b00d409003853e8bdaa8c25c4e1e436b1ed2f28 (diff) | |
download | bcm5719-llvm-16fd8fec76129351e053ed5bf64a0f972b48dcb3.tar.gz bcm5719-llvm-16fd8fec76129351e053ed5bf64a0f972b48dcb3.zip |
Fix incorrect initial value of __kmp_affinity_type.
Affinity initialization code expects __kmp_affinity_type has the value
affinity_default by default, but the cleanup code does not properly set the
value back to affinity_default. This may introduce some issues when multiple
roots are trying to initialize/uninitialize the runtime successively.
Patch by Hansang Bae
Differential Revision: https://reviews.llvm.org/D31012
llvm-svn: 298313
Diffstat (limited to 'openmp/runtime/src/kmp_affinity.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_affinity.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp index 8200b9a3d5f..83f801cddfe 100644 --- a/openmp/runtime/src/kmp_affinity.cpp +++ b/openmp/runtime/src/kmp_affinity.cpp @@ -4197,6 +4197,7 @@ __kmp_affinity_uninitialize(void) __kmp_affin_fullMask = NULL; } __kmp_affinity_num_masks = 0; + __kmp_affinity_type = affinity_default; # if OMP_40_ENABLED __kmp_affinity_num_places = 0; # endif |