< prev index next >

src/hotspot/os_cpu/solaris_sparc/atomic_solaris_sparc.hpp

Print this page

        

*** 28,39 **** // Implementation of class atomic // Implement ADD using a CAS loop. template<size_t byte_size> struct Atomic::PlatformAdd { ! template<typename I, typename D> ! inline D operator()(I add_value, D volatile* dest, atomic_memory_order order) const { D old_value = *dest; while (true) { D new_value = old_value + add_value; D result = cmpxchg(new_value, dest, old_value); if (result == old_value) break; --- 28,39 ---- // Implementation of class atomic // Implement ADD using a CAS loop. template<size_t byte_size> struct Atomic::PlatformAdd { ! template<typename D, typename I> ! inline D operator()(D volatile* dest, I add_value, atomic_memory_order order) const { D old_value = *dest; while (true) { D new_value = old_value + add_value; D result = cmpxchg(new_value, dest, old_value); if (result == old_value) break;
< prev index next >