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