< prev index next >

src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp

Print this page

        

*** 28,37 **** --- 28,38 ---- #ifndef PPC64 #error "Atomic currently only implemented for PPC64" #endif + #include "orderAccess_linux_ppc.hpp" #include "utilities/debug.hpp" // Implementation of class atomic //
*** 397,402 **** --- 398,415 ---- post_membar(order); return old_value; } + template<size_t byte_size> + struct Atomic::PlatformOrderedLoad<byte_size, X_ACQUIRE> + { + template <typename T> + T operator()(const volatile T* p) const { + T t = Atomic::load(p); + // Use twi-isync for load_acquire (faster than lwsync). + __asm__ __volatile__ ("twi 0,%0,0\n isync\n" : : "r" (t) : "memory"); + return t; + } + }; + #endif // OS_CPU_LINUX_PPC_ATOMIC_LINUX_PPC_HPP
< prev index next >