src/hotspot/share/runtime/objectMonitor.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff src/hotspot/share/runtime

src/hotspot/share/runtime/objectMonitor.hpp

Print this page




 122 //     field.
 123 //
 124 //   - The _recursions field should be of type int, or int32_t but not
 125 //     intptr_t. There's no reason to use a 64-bit type for this field
 126 //     in a 64-bit JVM.
 127 
 128 class ObjectMonitor {
 129  public:
 130   enum {
 131     OM_OK,                    // no error
 132     OM_SYSTEM_ERROR,          // operating system error
 133     OM_ILLEGAL_MONITOR_STATE, // IllegalMonitorStateException
 134     OM_INTERRUPTED,           // Thread.interrupt()
 135     OM_TIMED_OUT              // Object.wait() timed out
 136   };
 137 
 138  private:
 139   friend class ObjectSynchronizer;
 140   friend class ObjectWaiter;
 141   friend class VMStructs;

 142 
 143   volatile markOop   _header;       // displaced object header word - mark
 144   void*     volatile _object;       // backward object pointer - strong root
 145  public:
 146   ObjectMonitor*     FreeNext;      // Free list linkage
 147  private:
 148   DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE,
 149                         sizeof(volatile markOop) + sizeof(void * volatile) +
 150                         sizeof(ObjectMonitor *));
 151  protected:                         // protected for JvmtiRawMonitor
 152   void *  volatile _owner;          // pointer to owning thread OR BasicLock
 153   volatile jlong _previous_owner_tid;  // thread id of the previous owner of the monitor
 154   volatile intptr_t  _recursions;   // recursion count, 0 for first entry
 155   ObjectWaiter * volatile _EntryList; // Threads blocked on entry or reentry.
 156                                       // The list is actually composed of WaitNodes,
 157                                       // acting as proxies for Threads.
 158  private:
 159   ObjectWaiter * volatile _cxq;     // LL of recently-arrived threads blocked on entry.
 160   Thread * volatile _succ;          // Heir presumptive thread - used for futile wakeup throttling
 161   Thread * volatile _Responsible;




 122 //     field.
 123 //
 124 //   - The _recursions field should be of type int, or int32_t but not
 125 //     intptr_t. There's no reason to use a 64-bit type for this field
 126 //     in a 64-bit JVM.
 127 
 128 class ObjectMonitor {
 129  public:
 130   enum {
 131     OM_OK,                    // no error
 132     OM_SYSTEM_ERROR,          // operating system error
 133     OM_ILLEGAL_MONITOR_STATE, // IllegalMonitorStateException
 134     OM_INTERRUPTED,           // Thread.interrupt()
 135     OM_TIMED_OUT              // Object.wait() timed out
 136   };
 137 
 138  private:
 139   friend class ObjectSynchronizer;
 140   friend class ObjectWaiter;
 141   friend class VMStructs;
 142   JVMCI_ONLY(friend class JVMCIVMStructs;)
 143 
 144   volatile markOop   _header;       // displaced object header word - mark
 145   void*     volatile _object;       // backward object pointer - strong root
 146  public:
 147   ObjectMonitor*     FreeNext;      // Free list linkage
 148  private:
 149   DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE,
 150                         sizeof(volatile markOop) + sizeof(void * volatile) +
 151                         sizeof(ObjectMonitor *));
 152  protected:                         // protected for JvmtiRawMonitor
 153   void *  volatile _owner;          // pointer to owning thread OR BasicLock
 154   volatile jlong _previous_owner_tid;  // thread id of the previous owner of the monitor
 155   volatile intptr_t  _recursions;   // recursion count, 0 for first entry
 156   ObjectWaiter * volatile _EntryList; // Threads blocked on entry or reentry.
 157                                       // The list is actually composed of WaitNodes,
 158                                       // acting as proxies for Threads.
 159  private:
 160   ObjectWaiter * volatile _cxq;     // LL of recently-arrived threads blocked on entry.
 161   Thread * volatile _succ;          // Heir presumptive thread - used for futile wakeup throttling
 162   Thread * volatile _Responsible;


src/hotspot/share/runtime/objectMonitor.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File