summaryrefslogtreecommitdiff
path: root/openmp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2018-09-07 18:46:40 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2018-09-07 18:46:40 +0000
commitf46aaad8459e9706b7d19fed39d2b4993d058d5f (patch)
treea0fe75c651ed445b49375f25f5c8d090deae77ec /openmp
parent4deb03eedd3a4cb2d54c674fb2d95af13ccb29bd (diff)
[OpenMP] Change hint parameter type for critical to uint32_t
Add atomic hint flags to the enum. The hint parameter type was changed to uint32_t in __kmpc_critical_with_hint() Patch by Olga Malysheva Differential Revision: https://reviews.llvm.org/D51235
Diffstat (limited to 'openmp')
-rw-r--r--openmp/runtime/src/kmp.h6
-rw-r--r--openmp/runtime/src/kmp_csupport.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index 796fb54232b..97908e1aadb 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -207,6 +207,10 @@ enum {
an invalid combination of hints to mean that another, larger field
should be used in a different flag. */
KMP_IDENT_ATOMIC_HINT_MASK = 0xFF0000,
+ KMP_IDENT_ATOMIC_HINT_UNCONTENDED = 0x010000,
+ KMP_IDENT_ATOMIC_HINT_CONTENDED = 0x020000,
+ KMP_IDENT_ATOMIC_HINT_NONSPECULATIVE = 0x040000,
+ KMP_IDENT_ATOMIC_HINT_SPECULATIVE = 0x080000,
};
/*!
@@ -3656,7 +3660,7 @@ KMP_EXPORT void __kmpc_end_critical(ident_t *, kmp_int32 global_tid,
#if OMP_45_ENABLED
KMP_EXPORT void __kmpc_critical_with_hint(ident_t *, kmp_int32 global_tid,
- kmp_critical_name *, uintptr_t hint);
+ kmp_critical_name *, uint32_t hint);
#endif
KMP_EXPORT kmp_int32 __kmpc_barrier_master(ident_t *, kmp_int32 global_tid);
diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp
index 74c6e4fcd28..8c8b8eb26f8 100644
--- a/openmp/runtime/src/kmp_csupport.cpp
+++ b/openmp/runtime/src/kmp_csupport.cpp
@@ -1351,7 +1351,7 @@ thread can enter the critical section unless the hint suggests use of
speculative execution and the hardware supports it.
*/
void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 global_tid,
- kmp_critical_name *crit, uintptr_t hint) {
+ kmp_critical_name *crit, uint32_t hint) {
KMP_COUNT_BLOCK(OMP_CRITICAL);
kmp_user_lock_p lck;
#if OMPT_SUPPORT && OMPT_OPTIONAL