java.lang.Object
Run_Time.Monitor
- public class Monitor
- extends java.lang.Object
|
Constructor Summary |
private |
Monitor()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Monitor
private Monitor()
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.