24 |
24 |
25 #ifndef OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_HPP |
25 #ifndef OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_HPP |
26 #define OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_HPP |
26 #define OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_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 (jlong store_value, jlong* dest) { *dest = store_value; } |
|
34 inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) { *dest = store_value; } |
|
35 inline void Atomic::store_ptr(void* store_value, void* dest) { *(void**)dest = store_value; } |
|
36 |
|
37 inline void Atomic::store (jbyte store_value, volatile jbyte* dest) { *dest = store_value; } |
|
38 inline void Atomic::store (jshort store_value, volatile jshort* dest) { *dest = store_value; } |
|
39 inline void Atomic::store (jint store_value, volatile jint* dest) { *dest = store_value; } |
|
40 inline void Atomic::store (jlong store_value, volatile jlong* dest) { *dest = store_value; } |
|
41 inline void Atomic::store_ptr(intptr_t store_value, volatile intptr_t* dest) { *dest = store_value; } |
|
42 inline void Atomic::store_ptr(void* store_value, volatile void* dest) { *(void* volatile *)dest = store_value; } |
|
43 |
|
44 inline jlong Atomic::load(const volatile jlong* src) { return *src; } |
|
45 |
29 |
46 template<size_t byte_size> |
30 template<size_t byte_size> |
47 struct Atomic::PlatformAdd |
31 struct Atomic::PlatformAdd |
48 : Atomic::AddAndFetch<Atomic::PlatformAdd<byte_size> > |
32 : Atomic::AddAndFetch<Atomic::PlatformAdd<byte_size> > |
49 { |
33 { |