From 1742eced55a932f539e4a54b5ab2c0ec9780f456 Mon Sep 17 00:00:00 2001 From: Jonathan Peyton Date: Wed, 28 Nov 2018 20:19:53 +0000 Subject: [PATCH] [OpenMP] Rename ompt_mutex_impl_unknown to ompt_mutex_impl_none This change renames ompt_mutex_impl_unknown to ompt_mutex_impl_none, following the name change in the specification. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D54347 llvm-svn: 347802 --- openmp/runtime/src/include/50/ompt.h.var | 2 +- openmp/runtime/src/kmp_csupport.cpp | 6 +++--- openmp/runtime/test/ompt/misc/api_calls_from_other_thread.cpp | 2 +- openmp/runtime/test/ompt/misc/api_calls_misc.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openmp/runtime/src/include/50/ompt.h.var b/openmp/runtime/src/include/50/ompt.h.var index 24fc90b..258c2c2 100644 --- a/openmp/runtime/src/include/50/ompt.h.var +++ b/openmp/runtime/src/include/50/ompt.h.var @@ -96,7 +96,7 @@ #define FOREACH_KMP_MUTEX_IMPL(macro) \ - macro (ompt_mutex_impl_unknown, 0) /* unknown implementation */ \ + macro (ompt_mutex_impl_none, 0) /* unknown implementation */ \ macro (kmp_mutex_impl_spin, 1) /* based on spin */ \ macro (kmp_mutex_impl_queuing, 2) /* based on some fair policy */ \ macro (kmp_mutex_impl_speculative, 3) /* based on HW-supported speculation */ diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp index ac76794..5cf074f 100644 --- a/openmp/runtime/src/kmp_csupport.cpp +++ b/openmp/runtime/src/kmp_csupport.cpp @@ -1292,7 +1292,7 @@ __ompt_get_mutex_impl_type(void *user_lock, kmp_indirect_lock_t *ilock = 0) { return kmp_mutex_impl_speculative; #endif default: - return ompt_mutex_impl_unknown; + return ompt_mutex_impl_none; } ilock = KMP_LOOKUP_I_LOCK(user_lock); } @@ -1316,7 +1316,7 @@ __ompt_get_mutex_impl_type(void *user_lock, kmp_indirect_lock_t *ilock = 0) { case locktag_nested_drdpa: return kmp_mutex_impl_queuing; default: - return ompt_mutex_impl_unknown; + return ompt_mutex_impl_none; } } #else @@ -1339,7 +1339,7 @@ static kmp_mutex_impl_t __ompt_get_mutex_impl_type() { return kmp_mutex_impl_speculative; #endif default: - return ompt_mutex_impl_unknown; + return ompt_mutex_impl_none; } } #endif // KMP_USE_DYNAMIC_LOCK diff --git a/openmp/runtime/test/ompt/misc/api_calls_from_other_thread.cpp b/openmp/runtime/test/ompt/misc/api_calls_from_other_thread.cpp index 470d7cd..2e71fd9 100644 --- a/openmp/runtime/test/ompt/misc/api_calls_from_other_thread.cpp +++ b/openmp/runtime/test/ompt/misc/api_calls_from_other_thread.cpp @@ -36,7 +36,7 @@ void f() { printf("%" PRIu64 ": ompt_enumerate_states()=%d\n", tvalue, ompt_enumerate_states(state, &state, &state_name)); - int impl = ompt_mutex_impl_unknown; + int impl = ompt_mutex_impl_none; const char *impl_name; printf("%" PRIu64 ": ompt_enumerate_mutex_impls()=%d\n", tvalue, ompt_enumerate_mutex_impls(impl, &impl, &impl_name)); diff --git a/openmp/runtime/test/ompt/misc/api_calls_misc.c b/openmp/runtime/test/ompt/misc/api_calls_misc.c index d567b1b..a546d7a 100644 --- a/openmp/runtime/test/ompt/misc/api_calls_misc.c +++ b/openmp/runtime/test/ompt/misc/api_calls_misc.c @@ -35,7 +35,7 @@ int main() { } // ompt_enumerate_mutex_impls() - int impl = ompt_mutex_impl_unknown; + int impl = ompt_mutex_impl_none; const char *impl_name; steps = 0; while (ompt_enumerate_mutex_impls(impl, &impl, &impl_name) && -- 2.7.4