[Openmp-commits] [openmp] r341694 - [OpenMP] Change hint parameter type for critical to uint32_t

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Fri Sep 7 11:46:40 PDT 2018


Author: jlpeyton
Date: Fri Sep  7 11:46:40 2018
New Revision: 341694

URL: http://llvm.org/viewvc/llvm-project?rev=341694&view=rev
Log:
[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

Modified:
    openmp/trunk/runtime/src/kmp.h
    openmp/trunk/runtime/src/kmp_csupport.cpp

Modified: openmp/trunk/runtime/src/kmp.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp.h?rev=341694&r1=341693&r2=341694&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp.h (original)
+++ openmp/trunk/runtime/src/kmp.h Fri Sep  7 11:46:40 2018
@@ -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(iden
 
 #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);

Modified: openmp/trunk/runtime/src/kmp_csupport.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.cpp?rev=341694&r1=341693&r2=341694&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.cpp (original)
+++ openmp/trunk/runtime/src/kmp_csupport.cpp Fri Sep  7 11:46:40 2018
@@ -1351,7 +1351,7 @@ thread can enter the critical section un
 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




More information about the Openmp-commits mailing list