jfb added a comment.

In http://reviews.llvm.org/D17950#376965, @jfb wrote:

> In http://reviews.llvm.org/D17950#376349, @jyknight wrote:
>
> > 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.
>
>
> Hmm, when I originally wrote the paper I though I'd tried that. Can't 
> remember why I went the other way, let me try out 
> `__atomic_always_lock_free`. That would indeed be much simpler as it would be 
> a pure libc++ change., thanks for raising the issue.


Changed to what you suggested. Much nicer. I don't remember why I thought it 
was a bad idea.


http://reviews.llvm.org/D17950



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to