< prev index next >

src/hotspot/os_cpu/linux_aarch64/orderAccess_linux_aarch64.hpp

Print this page

        

*** 35,44 **** --- 35,48 ---- inline void OrderAccess::loadload() { acquire(); } inline void OrderAccess::storestore() { release(); } inline void OrderAccess::loadstore() { acquire(); } inline void OrderAccess::storeload() { fence(); } + #define FULL_MEM_BARRIER __sync_synchronize() + #define READ_MEM_BARRIER __atomic_thread_fence(__ATOMIC_ACQUIRE); + #define WRITE_MEM_BARRIER __atomic_thread_fence(__ATOMIC_RELEASE); + inline void OrderAccess::acquire() { READ_MEM_BARRIER; } inline void OrderAccess::release() {
*** 49,75 **** FULL_MEM_BARRIER; } inline void OrderAccess::cross_modify_fence() { } - template<size_t byte_size> - struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE> - { - template <typename T> - T operator()(const volatile T* p) const { T data; __atomic_load(const_cast<T*>(p), &data, __ATOMIC_ACQUIRE); return data; } - }; - - template<size_t byte_size> - struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X> - { - template <typename T> - void operator()(T v, volatile T* p) const { __atomic_store(const_cast<T*>(p), &v, __ATOMIC_RELEASE); } - }; - - template<size_t byte_size> - struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X_FENCE> - { - template <typename T> - void operator()(T v, volatile T* p) const { release_store(p, v); fence(); } - }; - #endif // OS_CPU_LINUX_AARCH64_ORDERACCESS_LINUX_AARCH64_HPP --- 53,58 ----
< prev index next >