equal
deleted
inserted
replaced
34 |
34 |
35 template<size_t byte_size> |
35 template<size_t byte_size> |
36 struct Atomic::PlatformAdd |
36 struct Atomic::PlatformAdd |
37 : Atomic::AddAndFetch<Atomic::PlatformAdd<byte_size> > |
37 : Atomic::AddAndFetch<Atomic::PlatformAdd<byte_size> > |
38 { |
38 { |
39 template<typename I, typename D> |
39 template<typename D, typename I> |
40 D add_and_fetch(I add_value, D volatile* dest, atomic_memory_order order) const { |
40 D add_and_fetch(D volatile* dest, I add_value, atomic_memory_order order) const { |
41 D res = __atomic_add_fetch(dest, add_value, __ATOMIC_RELEASE); |
41 D res = __atomic_add_fetch(dest, add_value, __ATOMIC_RELEASE); |
42 FULL_MEM_BARRIER; |
42 FULL_MEM_BARRIER; |
43 return res; |
43 return res; |
44 } |
44 } |
45 }; |
45 }; |