< prev index next >

src/hotspot/share/runtime/mutex.hpp

Print this page




 129   ParkEvent * volatile _OnDeck ;         // heir-presumptive
 130   volatile intptr_t _WaitLock [1] ;      // Protects _WaitSet
 131   ParkEvent * volatile  _WaitSet ;       // LL of ParkEvents
 132   volatile bool     _snuck;              // Used for sneaky locking (evil).
 133   char _name[MONITOR_NAME_LEN];          // Name of mutex
 134 
 135   // Debugging fields for naming, deadlock detection, etc. (some only used in debug mode)
 136 #ifndef PRODUCT
 137   bool      _allow_vm_block;
 138   debug_only(int _rank;)                 // rank (to avoid/detect potential deadlocks)
 139   debug_only(Monitor * _next;)           // Used by a Thread to link up owned locks
 140   debug_only(Thread* _last_owner;)       // the last thread to own the lock
 141   debug_only(static bool contains(Monitor * locks, Monitor * lock);)
 142   debug_only(static Monitor * get_least_ranked_lock(Monitor * locks);)
 143   debug_only(Monitor * get_least_ranked_lock_besides_this(Monitor * locks);)
 144 #endif
 145 
 146   void set_owner_implementation(Thread* owner)                        PRODUCT_RETURN;
 147   void check_prelock_state     (Thread* thread, bool safepoint_check) PRODUCT_RETURN;
 148   void check_block_state       (Thread* thread)                       PRODUCT_RETURN;

 149 
 150   // platform-dependent support code can go here (in os_<os_family>.cpp)
 151  public:
 152   enum {
 153     _no_safepoint_check_flag    = true,
 154     _allow_vm_block_flag        = true,
 155     _as_suspend_equivalent_flag = true
 156   };
 157 
 158   // Locks can be acquired with or without safepoint check.
 159   // Monitor::lock and Monitor::lock_without_safepoint_check
 160   // checks these flags when acquiring a lock to ensure
 161   // consistent checking for each lock.
 162   // A few existing locks will sometimes have a safepoint check and
 163   // sometimes not, but these locks are set up in such a way to avoid deadlocks.
 164   enum SafepointCheckRequired {
 165     _safepoint_check_never,       // Monitors with this value will cause errors
 166                                   // when acquired with a safepoint check.
 167     _safepoint_check_sometimes,   // Certain locks are called sometimes with and
 168                                   // sometimes without safepoint checks. These




 129   ParkEvent * volatile _OnDeck ;         // heir-presumptive
 130   volatile intptr_t _WaitLock [1] ;      // Protects _WaitSet
 131   ParkEvent * volatile  _WaitSet ;       // LL of ParkEvents
 132   volatile bool     _snuck;              // Used for sneaky locking (evil).
 133   char _name[MONITOR_NAME_LEN];          // Name of mutex
 134 
 135   // Debugging fields for naming, deadlock detection, etc. (some only used in debug mode)
 136 #ifndef PRODUCT
 137   bool      _allow_vm_block;
 138   debug_only(int _rank;)                 // rank (to avoid/detect potential deadlocks)
 139   debug_only(Monitor * _next;)           // Used by a Thread to link up owned locks
 140   debug_only(Thread* _last_owner;)       // the last thread to own the lock
 141   debug_only(static bool contains(Monitor * locks, Monitor * lock);)
 142   debug_only(static Monitor * get_least_ranked_lock(Monitor * locks);)
 143   debug_only(Monitor * get_least_ranked_lock_besides_this(Monitor * locks);)
 144 #endif
 145 
 146   void set_owner_implementation(Thread* owner)                        PRODUCT_RETURN;
 147   void check_prelock_state     (Thread* thread, bool safepoint_check) PRODUCT_RETURN;
 148   void check_block_state       (Thread* thread)                       PRODUCT_RETURN;
 149   void check_safepoint_state   (Thread* Self, bool safepoint_check)   PRODUCT_RETURN;
 150 
 151   // platform-dependent support code can go here (in os_<os_family>.cpp)
 152  public:
 153   enum {
 154     _no_safepoint_check_flag    = true,
 155     _allow_vm_block_flag        = true,
 156     _as_suspend_equivalent_flag = true
 157   };
 158 
 159   // Locks can be acquired with or without safepoint check.
 160   // Monitor::lock and Monitor::lock_without_safepoint_check
 161   // checks these flags when acquiring a lock to ensure
 162   // consistent checking for each lock.
 163   // A few existing locks will sometimes have a safepoint check and
 164   // sometimes not, but these locks are set up in such a way to avoid deadlocks.
 165   enum SafepointCheckRequired {
 166     _safepoint_check_never,       // Monitors with this value will cause errors
 167                                   // when acquired with a safepoint check.
 168     _safepoint_check_sometimes,   // Certain locks are called sometimes with and
 169                                   // sometimes without safepoint checks. These


< prev index next >