[PATCH] D17951: Implement is_always_lock_free

JF Bastien via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 7 18:26:40 PST 2016


jfb added inline comments.

================
Comment at: include/atomic:840
@@ +839,3 @@
+#define ATOMIC_LLONG_LOCK_FREE     __GCC_ATOMIC_LLONG_LOCK_FREE
+#define ATOMIC_POINTER_LOCK_FREE   __GCC_ATOMIC_POINTER_LOCK_FREE
+
----------------
Moving these from the bottom of the file since I need them.

================
Comment at: include/atomic:887
@@ +886,3 @@
+    false;
+#   endif
+# endif
----------------
This is slightly ugly, but I don't see a better way to go about without breaking libc++ when it's not exactly in sync with clang, or when it's used with GCC (until GCC picks up these macros).

================
Comment at: test/std/atomics/atomics.lockfree/lockfree.pass.cpp:23
@@ -21,2 +22,3 @@
 // #define ATOMIC_LLONG_LOCK_FREE unspecified
+// #define ATOMIC_POINTER_LOCK_FREE unspecified
 
----------------
BOOL and POINTER weren't tested, I'm adding them while I'm here.


http://reviews.llvm.org/D17951





More information about the cfe-commits mailing list