org.jikesrvm.scheduler
Class LightMonitor

java.lang.Object
  extended by org.jikesrvm.scheduler.LightMonitor

public final class LightMonitor
extends Object

A light-weigh condition variable and lock, like Monitor, but this one is movable and can be garbage collected. Note that this lock is heavier than an object monitor, but has the advantage of being usable within GC (this lock never allocates in its methods, and never uses read or write barriers, either).


Field Summary
(package private)  ThreadQueue entering
           
(package private)  RVMThread holder
           
(package private)  SpinLock mutex
           
(package private)  int recCount
           
(package private)  ThreadQueue waiting
           
 
Constructor Summary
LightMonitor()
           
 
Method Summary
 void broadcast()
           
 void lockedBroadcastWithHandshake()
           
 void lockWithHandshake()
           
 void timedWaitAbsoluteInterruptibly(long whenAwakeNanos)
           
 void timedWaitRelativeInterruptibly(long delayNanos)
           
 void unlock()
           
private  void waitImpl(long whenAwake)
           
 void waitInterruptibly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

waiting

ThreadQueue waiting

entering

ThreadQueue entering

mutex

SpinLock mutex

holder

RVMThread holder

recCount

int recCount
Constructor Detail

LightMonitor

public LightMonitor()
Method Detail

lockWithHandshake

public void lockWithHandshake()

unlock

public void unlock()

waitImpl

private void waitImpl(long whenAwake)

waitInterruptibly

public void waitInterruptibly()

timedWaitAbsoluteInterruptibly

public void timedWaitAbsoluteInterruptibly(long whenAwakeNanos)

timedWaitRelativeInterruptibly

public void timedWaitRelativeInterruptibly(long delayNanos)

broadcast

public void broadcast()

lockedBroadcastWithHandshake

public void lockedBroadcastWithHandshake()