< prev index next >

src/hotspot/share/runtime/mutex.hpp

Print this page
@@ -97,10 +97,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

@@ -196,10 +197,13 @@
    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 void  add_mutex(Mutex* var);
  
    void print_on_error(outputStream* st) const;
    #ifndef PRODUCT
      void print_on(outputStream* st) const;

@@ -208,10 +212,12 @@
  
    // Print all mutexes/monitors that are currently owned by a thread; called
    // by fatal error handler.
    static void print_owned_locks_on_error(outputStream* st);
    static void print_lock_ranks(outputStream* st);
+ 
+   static int num_mutex() { return _num_mutex; }
  };
  
  class Monitor : public Mutex {
   public:
    Monitor(Rank rank, const char *name, bool allow_vm_block)  :
< prev index next >