< prev index next >

src/hotspot/share/runtime/mutex.hpp

Print this page
*** 96,10 ***
--- 96,11 ---
    void raw_set_owner(Thread* new_owner) { Atomic::store(&_owner, new_owner); }
  
   protected:                              // Monitor-Mutex metadata
    PlatformMonitor _lock;                 // Native monitor implementation
    const char* _name;                     // Name of mutex/monitor
+   int _id;                               // ID for named mutexes
  
    // Debugging fields for naming, deadlock detection, etc. (some only used in debug mode)
  #ifndef PRODUCT
    bool    _allow_vm_block;
  #endif

*** 192,10 ***
--- 193,15 ---
    void set_owner(Thread* owner) { set_owner_implementation(owner); }
    bool owned_by_self() const;
  
    const char *name() const                  { return _name; }
  
+   int      id() const { return _id; }
+ //  void set_id(int id) { _id = id; }
+ 
+   static const char* id2name(int id);
+ 
    void print_on_error(outputStream* st) const;
    #ifndef PRODUCT
      void print_on(outputStream* st) const;
      void print() const;
    #endif
< prev index next >