< prev index next >

src/hotspot/share/runtime/objectMonitor.inline.hpp

Print this page
@@ -142,10 +142,25 @@
  // Add value to the contentions field.
  inline void ObjectMonitor::add_to_contentions(int value) {
    Atomic::add(&_contentions, value);
  }
  
+ inline void ObjectMonitor::inc_unmounted_vthreads() {
+   assert(_unmounted_vthreads >= 0, "");
+   Atomic::inc(&_unmounted_vthreads, memory_order_relaxed);
+ }
+ 
+ inline void ObjectMonitor::dec_unmounted_vthreads() {
+   assert(_unmounted_vthreads > 0, "");
+   Atomic::dec(&_unmounted_vthreads, memory_order_relaxed);
+ }
+ 
+ inline bool ObjectMonitor::has_unmounted_vthreads() const {
+   assert(_unmounted_vthreads >= 0, "");
+   return Atomic::load(&_unmounted_vthreads) > 0;
+ }
+ 
  inline void ObjectMonitor::set_recursions(size_t recursions) {
    assert(_recursions == 0, "must be");
    assert(has_owner(), "must be owned");
    _recursions = checked_cast<intx>(recursions);
  }
< prev index next >