[libcxx-commits] [libcxx] [libc++] Fix inconsistency between is_lock_free and is_always_lock_free (PR #68109)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 3 15:26:07 PDT 2023
ldionne wrote:
> I'm a bit confused. Is it `_Atomic` that's adding the padding, or the struct we wrap it in?
My understanding is that it's `_Atomic(T)` itself. I think it does that to allow `Float3Arr` to be lockfree (it needs it to be a power-of-2 alignment). So `sizeof(_Atomic(Float3)) == 16` but `sizeof(Float3) == 12`.
https://github.com/llvm/llvm-project/pull/68109
More information about the libcxx-commits
mailing list