Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Run_Time
Class Monitor  view Monitor download Monitor.java

java.lang.Object
  extended byRun_Time.Monitor

public class Monitor
extends java.lang.Object


Field Summary
static Clazz.jq_InstanceField _atomic_count
           
static Clazz.jq_Class _class
           
static Clazz.jq_StaticMethod _monitorenter
           
static Clazz.jq_StaticMethod _monitorexit
           
(package private)  int atomic_count
           
(package private)  int entry_count
           
(package private)  Scheduler.jq_Thread monitor_owner
           
(package private)  int semaphore
           
static boolean TRACE
           
 
Constructor Summary
private Monitor()
           
 
Method Summary
static Monitor allocateInflatedLock()
           
 void free()
           
static int getLockEntryCount(java.lang.Object k)
          Returns the depth of the lock on the given object.
static Monitor getMonitor(int lockword)
          Get the Monitor object associated with this lockword.
static void installInflatedLock(java.lang.Object k, Monitor m)
          Installs an inflated lock on the given object.
 void lock(Scheduler.jq_Thread t)
          Lock this monitor with the given thread block.
static void monitorenter(java.lang.Object k)
          Monitorenter runtime routine.
static void monitorexit(java.lang.Object k)
          Monitorexit runtime routine.
 void releaseSemaphore()
          Create a semaphore if there isn't one already, and release it.
 void unlock(Scheduler.jq_Thread t)
          Unlock this monitor with the given thread block.
 void waitOnSemaphore()
          Create a semaphore if there isn't one already, and wait on it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE

public static boolean TRACE

atomic_count

int atomic_count

monitor_owner

Scheduler.jq_Thread monitor_owner

entry_count

int entry_count

semaphore

int semaphore

_class

public static final Clazz.jq_Class _class

_monitorenter

public static final Clazz.jq_StaticMethod _monitorenter

_monitorexit

public static final Clazz.jq_StaticMethod _monitorexit

_atomic_count

public static final Clazz.jq_InstanceField _atomic_count
Constructor Detail

Monitor

private Monitor()
Method Detail

getLockEntryCount

public static int getLockEntryCount(java.lang.Object k)
Returns the depth of the lock on the given object.


monitorenter

public static void monitorenter(java.lang.Object k)
Monitorenter runtime routine. Checks for thin lock usage, otherwise falls back to inflated locks.


monitorexit

public static void monitorexit(java.lang.Object k)
Monitorexit runtime routine. Checks for thin lock usage, otherwise falls back to inflated locks.


getMonitor

public static Monitor getMonitor(int lockword)
Get the Monitor object associated with this lockword.


allocateInflatedLock

public static Monitor allocateInflatedLock()

free

public void free()

installInflatedLock

public static void installInflatedLock(java.lang.Object k,
                                       Monitor m)
Installs an inflated lock on the given object. Uses a spin-loop to wait until the object is unlocked or inflated.


lock

public void lock(Scheduler.jq_Thread t)
Lock this monitor with the given thread block.


unlock

public void unlock(Scheduler.jq_Thread t)
Unlock this monitor with the given thread block.


waitOnSemaphore

public void waitOnSemaphore()
Create a semaphore if there isn't one already, and wait on it.


releaseSemaphore

public void releaseSemaphore()
Create a semaphore if there isn't one already, and release it.