On 11/14/2011 08:08 AM, David Gilbert wrote: > There is unfortunately no guarantee that your kernel has support for the 64bit > cases, since this was only recently added - and the libgcc code checks > and aborts if linked in. > > (As far as I can tell there is approximately one potential user of 64bit > atomics > on ARM, so it's important not to do that check for all binaries).
Yes, I know. But that's something the user had to deal with before my patch too. But if I just put UNITS_PER_WORD there, you'll won't be able to use those routines even if the kernel support is present. This is something that is more ideally handled by the atomics library that is being discussed; __atomic_is_lock_free would be able to query the existence of the kernel support in reporting its result. Andrew, what's the state of discussion on the atomics library? While I understand that vendors want to be able to replace that library, and thus we want to settle on a standard ABI, I think *not* providing at least a reference copy with GCC is almost certainly a mistake. r~