test/hotspot/gtest/utilities/test_singleWriterSynchronizer.cpp
changeset 59247 56bf71d64d51
parent 58095 adc72cd1d1f2
--- a/test/hotspot/gtest/utilities/test_singleWriterSynchronizer.cpp	Mon Nov 25 14:06:13 2019 +0100
+++ b/test/hotspot/gtest/utilities/test_singleWriterSynchronizer.cpp	Mon Nov 25 12:22:13 2019 +0100
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
-#include "runtime/orderAccess.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 #include "runtime/thread.hpp"
 #include "utilities/debug.hpp"
@@ -56,14 +56,14 @@
   virtual void main_run() {
     size_t iterations = 0;
     size_t values_changed = 0;
-    while (OrderAccess::load_acquire(_continue_running) != 0) {
+    while (Atomic::load_acquire(_continue_running) != 0) {
       { ThreadBlockInVM tbiv(this); } // Safepoint check outside critical section.
       ++iterations;
       SingleWriterSynchronizer::CriticalSection cs(_synchronizer);
-      uintx value = OrderAccess::load_acquire(_synchronized_value);
+      uintx value = Atomic::load_acquire(_synchronized_value);
       uintx new_value = value;
       for (uint i = 0; i < reader_iterations; ++i) {
-        new_value = OrderAccess::load_acquire(_synchronized_value);
+        new_value = Atomic::load_acquire(_synchronized_value);
         // A reader can see either the value it first read after
         // entering the critical section, or that value + 1.  No other
         // values are possible.
@@ -97,7 +97,7 @@
   {}
 
   virtual void main_run() {
-    while (OrderAccess::load_acquire(_continue_running) != 0) {
+    while (Atomic::load_acquire(_continue_running) != 0) {
       ++*_synchronized_value;
       _synchronizer->synchronize();
       { ThreadBlockInVM tbiv(this); } // Safepoint check.