< prev index next >

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

Print this page

        

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