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

Andrey Churbanov via Openmp-commits openmp-commits at lists.llvm.org
Tue May 17 03:35:22 PDT 2016


AndreyChurbanov added a subscriber: AndreyChurbanov.
AndreyChurbanov added a comment.

> 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.


Actually these macros were intended not to make proper code, but to send signals to tools. E.g. so that memory checker would not complain on accesses to shared memory inside critical sections. I consulted with the consumers of this code - Intel tools, - and the resolution is the *_fsync_* apis are not used by them nowadays. So the code looks more dead than live, and these stubs entries are never resolved to point to actual entries. As opposed to *_sync_* apis those can be dynamically changed from empty stubs to code with actual calls.

- Andrey


Repository:
  rL LLVM

http://reviews.llvm.org/D19878





More information about the Openmp-commits mailing list