On 28/05/17 12:15, Toebs Douglass wrote: > What I see however is that there is a way for me to avoid these costs > and return to the simple situation. My code has an abstraction layer, > and I can implement inline assembly for double-word CAS on 64-bit > platforms and use that instead of __atomic and __sync. This only has to > be done for x86_64 (very simple) and aarch64 (complex, alas, so it > goes), since they are the only platforms to offer this. AArch64 has two sets of CAS instructions, in v8 and v8.1. A system can supply a version of libatomic which supports the most suitable implementation for the local hardware. If your machine has the CASP instruction, for example, you probably want to use it, but it can't be used in portable binaries. -- Andrew Haley Java Platform Lead Engineer Red Hat UK Ltd. <https://www.redhat.com> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671