src/hotspot/share/runtime/objectMonitor.hpp
changeset 55345 492b644bb9c2
parent 54807 33fe50b6d707
child 57734 18f4d3d46d54
equal deleted inserted replaced
55344:0c20dbc3d547 55345:492b644bb9c2
   233 
   233 
   234   intptr_t is_busy() const {
   234   intptr_t is_busy() const {
   235     // TODO-FIXME: assert _owner == null implies _recursions = 0
   235     // TODO-FIXME: assert _owner == null implies _recursions = 0
   236     return _contentions|_waiters|intptr_t(_owner)|intptr_t(_cxq)|intptr_t(_EntryList);
   236     return _contentions|_waiters|intptr_t(_owner)|intptr_t(_cxq)|intptr_t(_EntryList);
   237   }
   237   }
       
   238   const char* is_busy_to_string(stringStream* ss);
   238 
   239 
   239   intptr_t  is_entered(Thread* current) const;
   240   intptr_t  is_entered(Thread* current) const;
   240 
   241 
   241   void*     owner() const;
   242   void*     owner() const;
   242   void      set_owner(void* owner);
   243   void      set_owner(void* owner);
   266   void Recycle() {
   267   void Recycle() {
   267     // TODO: add stronger asserts ...
   268     // TODO: add stronger asserts ...
   268     // _cxq == 0 _succ == NULL _owner == NULL _waiters == 0
   269     // _cxq == 0 _succ == NULL _owner == NULL _waiters == 0
   269     // _contentions == 0 EntryList  == NULL
   270     // _contentions == 0 EntryList  == NULL
   270     // _recursions == 0 _WaitSet == NULL
   271     // _recursions == 0 _WaitSet == NULL
   271     assert(((is_busy()|_recursions) == 0), "freeing inuse monitor");
   272     DEBUG_ONLY(stringStream ss;)
       
   273     assert((is_busy() | _recursions) == 0, "freeing in-use monitor: %s, "
       
   274            "recursions=" INTPTR_FORMAT, is_busy_to_string(&ss), _recursions);
   272     _succ          = NULL;
   275     _succ          = NULL;
   273     _EntryList     = NULL;
   276     _EntryList     = NULL;
   274     _cxq           = NULL;
   277     _cxq           = NULL;
   275     _WaitSet       = NULL;
   278     _WaitSet       = NULL;
   276     _recursions    = 0;
   279     _recursions    = 0;