src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp
changeset 59249 29b0d0b61615
parent 59248 e92153ed8bdc
child 59251 4cbfa5077d68
--- a/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp	Mon Nov 25 12:30:24 2019 +0100
+++ b/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp	Mon Nov 25 12:31:39 2019 +0100
@@ -163,22 +163,22 @@
 struct Atomic::PlatformAdd
   : Atomic::AddAndFetch<Atomic::PlatformAdd<byte_size> >
 {
-  template<typename I, typename D>
-  D add_and_fetch(I add_value, D volatile* dest, atomic_memory_order order) const;
+  template<typename D, typename I>
+  D add_and_fetch(D volatile* dest, I add_value, atomic_memory_order order) const;
 };
 
 template<>
-template<typename I, typename D>
-inline D Atomic::PlatformAdd<4>::add_and_fetch(I add_value, D volatile* dest,
+template<typename D, typename I>
+inline D Atomic::PlatformAdd<4>::add_and_fetch(D volatile* dest, I add_value,
                                                atomic_memory_order order) const {
   STATIC_ASSERT(4 == sizeof(I));
   STATIC_ASSERT(4 == sizeof(D));
 
 #ifdef ARM
-  return add_using_helper<int>(arm_add_and_fetch, add_value, dest);
+  return add_using_helper<int>(arm_add_and_fetch, dest, add_value);
 #else
 #ifdef M68K
-  return add_using_helper<int>(m68k_add_and_fetch, add_value, dest);
+  return add_using_helper<int>(m68k_add_and_fetch, dest, add_value);
 #else
   return __sync_add_and_fetch(dest, add_value);
 #endif // M68K
@@ -186,8 +186,8 @@
 }
 
 template<>
-template<typename I, typename D>
-inline D Atomic::PlatformAdd<8>::add_and_fetch(I add_value, D volatile* dest,
+template<typename D, typename !>
+inline D Atomic::PlatformAdd<8>::add_and_fetch(D volatile* dest, I add_value,
                                                atomic_memory_order order) const {
   STATIC_ASSERT(8 == sizeof(I));
   STATIC_ASSERT(8 == sizeof(D));