[PATCH] D17950: Implement is_always_lock_free

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 17 08:05:34 PDT 2016


> A 4 byte cmpxchg could be lock free, while a 1 byte cmpxchg may not be
lock free.

That's not possible: if you have a 4-byte cmpxchg instruction, you can use
it to implement a 1-byte cmpxchg, too. Many targets do this already. (It
would be better if that was available generically so that code didn't need
to be written separately fit each target, but that's not the case at the
moment.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160317/4d9bf36b/attachment.html>


More information about the cfe-commits mailing list