Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8256301

ObjectMonitor::is_busy() should return bool

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 16
    • 17
    • hotspot
    • b24
    • generic
    • generic

    Description

      ObjectMonitor::is_busy() in src/hotspot/share/runtime/objectMonitor.hpp
      returns intptr_t:

        intptr_t is_busy() const {
          // TODO-FIXME: assert _owner == null implies _recursions = 0
          intptr_t ret_code = _waiters | intptr_t(_cxq) | intptr_t(_EntryList);
          if (contentions() > 0) {
            ret_code |= contentions();
          }
          if (_owner != DEFLATER_MARKER) {
            ret_code |= intptr_t(_owner);
          }
          return ret_code;
        }

      Generally, HotSpot style is that is_Foo() functions return bool
      so ObjectMonitor::is_busy() is an anomaly.

      This topic came during the discussion about:

          JDK-8253064 monitor list simplifications and getting rid of TSM

      Attachments

        Issue Links

          Activity

            People

              dcubed Daniel Daugherty
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: