24 |
24 |
25 #ifndef OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP |
25 #ifndef OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP |
26 #define OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP |
26 #define OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP |
27 |
27 |
28 // Implementation of class atomic |
28 // Implementation of class atomic |
29 |
|
30 inline void Atomic::store (jbyte store_value, jbyte* dest) { *dest = store_value; } |
|
31 inline void Atomic::store (jshort store_value, jshort* dest) { *dest = store_value; } |
|
32 inline void Atomic::store (jint store_value, jint* dest) { *dest = store_value; } |
|
33 inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) { *dest = store_value; } |
|
34 inline void Atomic::store_ptr(void* store_value, void* dest) { *(void**)dest = store_value; } |
|
35 |
|
36 inline void Atomic::store (jbyte store_value, volatile jbyte* dest) { *dest = store_value; } |
|
37 inline void Atomic::store (jshort store_value, volatile jshort* dest) { *dest = store_value; } |
|
38 inline void Atomic::store (jint store_value, volatile jint* dest) { *dest = store_value; } |
|
39 inline void Atomic::store_ptr(intptr_t store_value, volatile intptr_t* dest) { *dest = store_value; } |
|
40 inline void Atomic::store_ptr(void* store_value, volatile void* dest) { *(void* volatile *)dest = store_value; } |
|
41 |
|
42 inline void Atomic::store(jlong store_value, jlong* dest) { *dest = store_value; } |
|
43 inline void Atomic::store(jlong store_value, volatile jlong* dest) { *dest = store_value; } |
|
44 inline jlong Atomic::load(const volatile jlong* src) { return *src; } |
|
45 |
29 |
46 // Implement ADD using a CAS loop. |
30 // Implement ADD using a CAS loop. |
47 template<size_t byte_size> |
31 template<size_t byte_size> |
48 struct Atomic::PlatformAdd VALUE_OBJ_CLASS_SPEC { |
32 struct Atomic::PlatformAdd VALUE_OBJ_CLASS_SPEC { |
49 template<typename I, typename D> |
33 template<typename I, typename D> |