< prev index next >

src/hotspot/share/jfr/utilities/jfrRefCountPointer.hpp

Print this page

        

@@ -90,15 +90,15 @@
   mutable volatile int _refs;
  public:
   MultiThreadedRefCounter() : _refs(0) {}
 
   void inc() const {
-    Atomic::add(1, &_refs);
+    Atomic::add(&_refs, 1);
   }
 
   bool dec() const {
-    return 0 == Atomic::add((-1), &_refs);
+    return 0 == Atomic::add(&_refs, (-1));
   }
 
   int current() const {
    return _refs;
   }
< prev index next >