[PATCH] D21733: [tsan] Treat non-barrier OSAtomic* functions as barriers to avoid false positives

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 04:26:26 PDT 2016


dvyukov accepted this revision.
dvyukov added a comment.
This revision is now accepted and ready to land.

LGTM with a nit.


================
Comment at: lib/tsan/rtl/tsan_interceptors_mac.cc:35
@@ +34,3 @@
+// conservative and treat the non-barrier versions as mo_acq_rel.
+#define ORDER_BARRIER mo_acq_rel
+#define ORDER_NONBARRIER mo_acq_rel
----------------
Please use const int for there.
Constants generally lead to fewer issues during maintenance than text replacements.


http://reviews.llvm.org/D21733





More information about the llvm-commits mailing list