[Openmp-commits] [PATCH] D19878: Use C++11 atomics for ticket locks implementation

Paul Osmialowski via Openmp-commits openmp-commits at lists.llvm.org
Fri May 13 15:17:08 PDT 2016


pawosm01 added a comment.

Ok, now I see. If this code is not dead, is not live either. For example, KMP_FSYNC_RELEASING macro:

#if USE_ITT_BUILD
// Old stuff for reporting low-level internal synchronization.
#if USE_ITT_NOTIFY
#define KMP_FSYNC_RELEASING( obj )  __itt_fsync_releasing( (void *)( obj ) )
#else

define KMP_FSYNC_RELEASING( obj )        ((void)0)
==================================================

#endif
#else

define KMP_FSYNC_RELEASING( obj )        ((void)0)
==================================================

#endif

...where __itt_fsync_releasing() is declared:

/**

- @ingroup legacy
- @deprecated Legacy API
- @brief Fast synchronization which does no require spinning.
- - This special function is to be used by TBB and OpenMP libraries only when they know
- there is no spin but they need to suppress TC warnings about shared variable modifications.
- - It only has corresponding pointers in static library and does not have corresponding function
- in dynamic library.
- @see void __itt_sync_releasing(void* addr); */

void ITTAPI __itt_fsync_releasing(void* addr);

...but never defined!

IMHO the whole point of using C++11 atomics is to avoid necessity of using stuff like that. It is up to compiler (reinforced by memory order hints like std::memory_order_release) to generate proper binary code for targeted architecture, so no macros like KMP_FSYNC_RELEASING would be needed.


Repository:
  rL LLVM

http://reviews.llvm.org/D19878





More information about the Openmp-commits mailing list