[PATCH] D17950: Implement is_always_lock_free

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 16 06:59:57 PDT 2016


jyknight added a subscriber: jyknight.
jyknight added a comment.

This conflicts with http://reviews.llvm.org/D17933. Most of this change also seems unnecessary.

- I think the `is_always_lock_free` function should be defined based on the existing `__atomic_always_lock_free` builtin, not on defines (just like is_lock_free uses `__atomic_is_lock_free`, or `__c11_atomic_is_lock_free`, which is effectively an alias).
- Then, the new `__GCC_ATOMIC_DOUBLE_LOCK_FREE` macros are unnecessary, unless we need to actually define a `ATOMIC_DOUBLE_LOCK_FREE` macro.
- `__LLVM_ATOMIC_1_BYTES_LOCK_FREE` effectively duplicates `__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1`, so aren't needed.


http://reviews.llvm.org/D17950





More information about the cfe-commits mailing list