org.jikesrvm.mm.mminterface
Class SynchronizationBarrier

java.lang.Object
  extended by org.jikesrvm.mm.mminterface.SynchronizationBarrier

public class SynchronizationBarrier
extends Object

A synchronization barrier used to synchronize collector threads, and the processors they are running on, during parallel collections. The core barrier functionality is implemented by a barrier object. The code in this class was in charge of VM-related idiosyncrasies like computing how many processors are participating in a particular collection, but that is all obsolete now that we're using native threads. Hence this class is somewhat vestigial.


Field Summary
private  int[] counters
           
private  int countIdx
           
private  Monitor lock
           
private  int[] modes
           
private  int target
           
private static int verbose
           
 
Constructor Summary
SynchronizationBarrier()
          Constructor
 
Method Summary
private  boolean arrive(int mode)
           
 void boot()
           
 int rendezvous(int where)
          Wait for all other collectorThreads/processors to arrive at this barrier.
 void startupRendezvous()
          First rendezvous for a collection, called by all CollectorThreads that arrive to participate in a collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

verbose

private static final int verbose
See Also:
Constant Field Values

lock

private Monitor lock

target

private int target

counters

private int[] counters

modes

private int[] modes

countIdx

private int countIdx
Constructor Detail

SynchronizationBarrier

public SynchronizationBarrier()
Constructor

Method Detail

boot

public void boot()

rendezvous

public int rendezvous(int where)
Wait for all other collectorThreads/processors to arrive at this barrier.


startupRendezvous

public void startupRendezvous()
First rendezvous for a collection, called by all CollectorThreads that arrive to participate in a collection. Thread with gcOrdinal==1 is responsible for detecting detecting the number of processors (which is retarded since we already know how many there are).


arrive

private boolean arrive(int mode)