On 09/19/2018 09:59 PM, John David Anglin wrote:
On 2018-09-19 8:16 PM, Carlos O'Donell wrote:
DL_FIXUP_VALUE_TYPE *resultp = &reloc_result->addr;
+ DL_FIXUP_VALUE_TYPE value = atomic_load_acquire(resultp);
You are potentially requiring an atomic load of a structure whose size can be
an arbitrary size depending on machine and ABI design (64-bit fore 32-bit hppa,
and 128-bit for 64-bit ia64). These architectures might not have such wide
atomic operations, and ...
We have implemented 64-bit atomic loads and stores for 32-bit hppa. They are not well tested but
they might work. They use floating point loads and stores, and kernel helper. The code is pretty horrific :-(
We only need to use the fdesc->ip as the guard, so we don't really need the 64-bit
atomic, but other algorithms like the new pthread condvars can use them effectively
to accelerate and avoid 2 lws kernel helper calls and instead use 1 lws kernel helper
64-bit atomic.