org.jikesrvm.tuningfork
Class EventChunkQueue

java.lang.Object
  extended by org.jikesrvm.tuningfork.EventChunkQueue

public class EventChunkQueue
extends Object

A Queue of EventChunks.

Unlike ChunkQueue, this queue is designed to be used in uninterruptible contexts. It assumes that all EventChunks are NonMoving and externally kept alive for the GC; therefore it can mark its head and tail fields as Untraced.

TODO: consider implementing a non-blocking queue instead of using spin locks.


Field Summary
private  EventChunk head
           
private  SpinLock lock
           
private  EventChunk tail
           
 
Constructor Summary
EventChunkQueue()
           
 
Method Summary
 EventChunk dequeue()
           
 void enqueue(EventChunk c)
           
 boolean isEmpty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

head

private EventChunk head

tail

private EventChunk tail

lock

private final SpinLock lock
Constructor Detail

EventChunkQueue

public EventChunkQueue()
Method Detail

enqueue

public void enqueue(EventChunk c)

dequeue

public EventChunk dequeue()

isEmpty

public boolean isEmpty()