org.jikesrvm.scheduler
Class RVMThread.SoftHandshakeVisitor

java.lang.Object
  extended by org.jikesrvm.scheduler.RVMThread.SoftHandshakeVisitor
Enclosing class:
RVMThread

public static class RVMThread.SoftHandshakeVisitor
extends Object


Constructor Summary
RVMThread.SoftHandshakeVisitor()
           
 
Method Summary
 boolean checkAndSignal(RVMThread t)
          Set whatever flags need to be set to signal that the given thread should perform some action when it acknowledges the soft handshake.
 boolean includeThread(RVMThread t)
          Check whether to include the specified thread in the soft handshake.
 void notifyStuckInNative(RVMThread t)
          Called when it is determined that the thread is stuck in native.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RVMThread.SoftHandshakeVisitor

public RVMThread.SoftHandshakeVisitor()
Method Detail

checkAndSignal

public boolean checkAndSignal(RVMThread t)
Set whatever flags need to be set to signal that the given thread should perform some action when it acknowledges the soft handshake. If not interested in this thread, return false; otherwise return true. Returning true will cause a soft handshake request to be put through.

This method is called with the thread's monitor() held, but while the thread may still be running. This method is not called on mutators that have indicated that they are about to terminate.


notifyStuckInNative

public void notifyStuckInNative(RVMThread t)
Called when it is determined that the thread is stuck in native. While this method is being called, the thread cannot return to running Java code. As such, it is safe to perform actions "on the thread's behalf".


includeThread

public boolean includeThread(RVMThread t)
Check whether to include the specified thread in the soft handshake.

Parameters:
t - The thread to check for inclusion
Returns:
True if the thread should be included.