[Openmp-commits] [PATCH] D50774: [OMPT] Update types according to TR7

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 24 01:06:23 PDT 2018


protze.joachim added inline comments.


================
Comment at: runtime/src/kmp_csupport.cpp:2571
   int acquire_status =
       KMP_D_LOCK_FUNC(user_lock, set)((kmp_dyna_lock_t *)user_lock, gtid);
+#endif
----------------
hbae wrote:
> Invocation of the lock function should be outside of the OMPT code.
hbae is right, the function call must be there, only the variable is ompt-specific.

What you actually might do is leaving the declaration and assignment in the ifdef, but move the function call out. This should avoid compiler warnings on unused variable `acquire_status`


================
Comment at: runtime/src/kmp_csupport.cpp:2764
+  int release_status =
+      KMP_D_LOCK_FUNC(user_lock, unset)((kmp_dyna_lock_t *)user_lock, gtid);
   // This is the case, if called from omp_init_lock_with_hint:
----------------
hbae wrote:
> Same here.
You could do the same here, which will result in two separate ifdef blocks.


https://reviews.llvm.org/D50774





More information about the Openmp-commits mailing list