< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahSharedVariables.hpp

Print this page

        

@@ -45,23 +45,23 @@
   ShenandoahSharedFlag() {
     unset();
   }
 
   void set() {
-    OrderAccess::release_store_fence(&value, (ShenandoahSharedValue)SET);
+    Atomic::release_store_fence(&value, (ShenandoahSharedValue)SET);
   }
 
   void unset() {
-    OrderAccess::release_store_fence(&value, (ShenandoahSharedValue)UNSET);
+    Atomic::release_store_fence(&value, (ShenandoahSharedValue)UNSET);
   }
 
   bool is_set() const {
-    return OrderAccess::load_acquire(&value) == SET;
+    return Atomic::load_acquire(&value) == SET;
   }
 
   bool is_unset() const {
-    return OrderAccess::load_acquire(&value) == UNSET;
+    return Atomic::load_acquire(&value) == UNSET;
   }
 
   void set_cond(bool val) {
     if (val) {
       set();

@@ -116,11 +116,11 @@
 
   void set(uint mask) {
     assert (mask < (sizeof(ShenandoahSharedValue) * CHAR_MAX), "sanity");
     ShenandoahSharedValue mask_val = (ShenandoahSharedValue) mask;
     while (true) {
-      ShenandoahSharedValue ov = OrderAccess::load_acquire(&value);
+      ShenandoahSharedValue ov = Atomic::load_acquire(&value);
       if ((ov & mask_val) != 0) {
         // already set
         return;
       }
 

@@ -134,11 +134,11 @@
 
   void unset(uint mask) {
     assert (mask < (sizeof(ShenandoahSharedValue) * CHAR_MAX), "sanity");
     ShenandoahSharedValue mask_val = (ShenandoahSharedValue) mask;
     while (true) {
-      ShenandoahSharedValue ov = OrderAccess::load_acquire(&value);
+      ShenandoahSharedValue ov = Atomic::load_acquire(&value);
       if ((ov & mask_val) == 0) {
         // already unset
         return;
       }
 

@@ -149,24 +149,24 @@
       }
     }
   }
 
   void clear() {
-    OrderAccess::release_store_fence(&value, (ShenandoahSharedValue)0);
+    Atomic::release_store_fence(&value, (ShenandoahSharedValue)0);
   }
 
   bool is_set(uint mask) const {
     return !is_unset(mask);
   }
 
   bool is_unset(uint mask) const {
     assert (mask < (sizeof(ShenandoahSharedValue) * CHAR_MAX), "sanity");
-    return (OrderAccess::load_acquire(&value) & (ShenandoahSharedValue) mask) == 0;
+    return (Atomic::load_acquire(&value) & (ShenandoahSharedValue) mask) == 0;
   }
 
   bool is_clear() const {
-    return (OrderAccess::load_acquire(&value)) == 0;
+    return (Atomic::load_acquire(&value)) == 0;
   }
 
   void set_cond(uint mask, bool val) {
     if (val) {
       set(mask);

@@ -209,15 +209,15 @@
   }
 
   void set(T v) {
     assert (v >= 0, "sanity");
     assert (v < (sizeof(ShenandoahSharedValue) * CHAR_MAX), "sanity");
-    OrderAccess::release_store_fence(&value, (ShenandoahSharedValue)v);
+    Atomic::release_store_fence(&value, (ShenandoahSharedValue)v);
   }
 
   T get() const {
-    return (T)OrderAccess::load_acquire(&value);
+    return (T)Atomic::load_acquire(&value);
   }
 
   T cmpxchg(T new_value, T expected) {
     assert (new_value >= 0, "sanity");
     assert (new_value < (sizeof(ShenandoahSharedValue) * CHAR_MAX), "sanity");
< prev index next >