src/hotspot/os/bsd/os_bsd.cpp
changeset 59249 29b0d0b61615
parent 59248 e92153ed8bdc
child 59252 623722a6aeb9
--- a/src/hotspot/os/bsd/os_bsd.cpp	Mon Nov 25 12:30:24 2019 +0100
+++ b/src/hotspot/os/bsd/os_bsd.cpp	Mon Nov 25 12:31:39 2019 +0100
@@ -1894,7 +1894,7 @@
   }
 
   char buf[PATH_MAX + 1];
-  int num = Atomic::add(1, &cnt);
+  int num = Atomic::add(&cnt, 1);
 
   snprintf(buf, PATH_MAX + 1, "%s/hs-vm-%d-%d",
            os::get_temp_directory(), os::current_process_id(), num);
@@ -3264,7 +3264,7 @@
 
   while (processor_id < 0) {
     if (Atomic::cmpxchg(-2, &mapping[apic_id], -1) == -1) {
-      Atomic::store(&mapping[apic_id], Atomic::add(1, &next_processor_id) - 1);
+      Atomic::store(&mapping[apic_id], Atomic::add(&next_processor_id, 1) - 1);
     }
     processor_id = Atomic::load(&mapping[apic_id]);
   }