< prev index next >

src/share/vm/runtime/objectMonitor.hpp

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_OBJECTMONITOR_HPP
  26 #define SHARE_VM_RUNTIME_OBJECTMONITOR_HPP
  27 
  28 #include "runtime/os.hpp"
  29 #include "runtime/park.hpp"
  30 #include "runtime/perfData.hpp"
  31 


  32 // ObjectWaiter serves as a "proxy" or surrogate thread.
  33 // TODO-FIXME: Eliminate ObjectWaiter and use the thread-specific
  34 // ParkEvent instead.  Beware, however, that the JVMTI code
  35 // knows about ObjectWaiters, so we'll have to reconcile that code.
  36 // See next_waiter(), first_waiter(), etc.
  37 
  38 class ObjectWaiter : public StackObj {
  39  public:
  40   enum TStates { TS_UNDEF, TS_READY, TS_RUN, TS_WAIT, TS_ENTER, TS_CXQ } ;
  41   enum Sorted  { PREPEND, APPEND, SORTED } ;
  42   ObjectWaiter * volatile _next;
  43   ObjectWaiter * volatile _prev;
  44   Thread*       _thread;
  45   jlong         _notifier_tid;
  46   ParkEvent *   _event;
  47   volatile int  _notified ;
  48   volatile TStates TState ;
  49   Sorted        _Sorted ;           // List placement disposition
  50   bool          _active ;           // Contention monitoring is enabled
  51  public:




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_OBJECTMONITOR_HPP
  26 #define SHARE_VM_RUNTIME_OBJECTMONITOR_HPP
  27 
  28 #include "runtime/os.hpp"
  29 #include "runtime/park.hpp"
  30 #include "runtime/perfData.hpp"
  31 
  32 class ObjectMonitor;
  33 
  34 // ObjectWaiter serves as a "proxy" or surrogate thread.
  35 // TODO-FIXME: Eliminate ObjectWaiter and use the thread-specific
  36 // ParkEvent instead.  Beware, however, that the JVMTI code
  37 // knows about ObjectWaiters, so we'll have to reconcile that code.
  38 // See next_waiter(), first_waiter(), etc.
  39 
  40 class ObjectWaiter : public StackObj {
  41  public:
  42   enum TStates { TS_UNDEF, TS_READY, TS_RUN, TS_WAIT, TS_ENTER, TS_CXQ } ;
  43   enum Sorted  { PREPEND, APPEND, SORTED } ;
  44   ObjectWaiter * volatile _next;
  45   ObjectWaiter * volatile _prev;
  46   Thread*       _thread;
  47   jlong         _notifier_tid;
  48   ParkEvent *   _event;
  49   volatile int  _notified ;
  50   volatile TStates TState ;
  51   Sorted        _Sorted ;           // List placement disposition
  52   bool          _active ;           // Contention monitoring is enabled
  53  public:


< prev index next >