[Openmp-commits] [PATCH] D41166: Move definition of ompt_mutex_impl_t to ompt-internal.h

Simon Convent via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Dec 13 03:44:53 PST 2017


sconvent created this revision.
sconvent added reviewers: protze.joachim, Hahnfeld, jlpeyton.

The defintion is not part of the spec and thus should not be in the ompt.h file.


https://reviews.llvm.org/D41166

Files:
  runtime/src/include/50/ompt.h.var
  runtime/src/ompt-internal.h


Index: runtime/src/ompt-internal.h
===================================================================
--- runtime/src/ompt-internal.h
+++ runtime/src/ompt-internal.h
@@ -72,6 +72,18 @@
   void *idle_frame;
 } ompt_thread_info_t;
 
+#define FOREACH_OMPT_MUTEX_IMPL(macro)                                                \
+    macro (ompt_mutex_impl_unknown, 0)      /* unknown implementation */              \
+    macro (ompt_mutex_impl_spin, 1)         /* based on spin */                       \
+    macro (ompt_mutex_impl_queuing, 2)      /* based on some fair policy */           \
+    macro (ompt_mutex_impl_speculative, 3)  /* based on HW-supported speculation */
+
+typedef enum ompt_mutex_impl_t {
+#define ompt_mutex_impl_macro(impl, code) impl = code,
+    FOREACH_OMPT_MUTEX_IMPL(ompt_mutex_impl_macro)
+#undef ompt_mutex_impl_macro
+} ompt_mutex_impl_t;
+
 extern ompt_callbacks_internal_t ompt_callbacks;
 
 #if OMP_40_ENABLED && OMPT_SUPPORT && OMPT_OPTIONAL
Index: runtime/src/include/50/ompt.h.var
===================================================================
--- runtime/src/include/50/ompt.h.var
+++ runtime/src/include/50/ompt.h.var
@@ -82,13 +82,6 @@
                                                                                                 \
     /* implementation-specific states (512..) */
 
-
-#define FOREACH_OMPT_MUTEX_IMPL(macro)                                                \
-    macro (ompt_mutex_impl_unknown, 0)      /* unknown implementatin */               \
-    macro (ompt_mutex_impl_spin, 1)         /* based on spin */                       \
-    macro (ompt_mutex_impl_queuing, 2)      /* based on some fair policy */           \
-    macro (ompt_mutex_impl_speculative, 3)  /* based on HW-supported speculation */
-
 #define FOREACH_OMPT_EVENT(macro)                                                                                        \
                                                                                                                          \
     /*--- Mandatory Events ---*/                                                                                         \
@@ -233,16 +226,6 @@
 } ompt_set_result_t;
 
 
-/*----------------------
- * mutex implementations
- *----------------------*/
-typedef enum ompt_mutex_impl_t {
-#define ompt_mutex_impl_macro(impl, code) impl = code,
-    FOREACH_OMPT_MUTEX_IMPL(ompt_mutex_impl_macro)
-#undef ompt_mutex_impl_macro
-} ompt_mutex_impl_t;
-
-
 /*****************************************************************************
  * callback signatures
  *****************************************************************************/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41166.126715.patch
Type: text/x-patch
Size: 2658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20171213/c2c83aa8/attachment.bin>


More information about the Openmp-commits mailing list