uk.ac.man.cs.rainbow.simulator.rasm
Class WaitRelease

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.simulator.Instruction
        |
        +--uk.ac.man.cs.rainbow.simulator.RASM.ChannelBox
              |
              +--uk.ac.man.cs.rainbow.simulator.rasm.WaitRelease
All Implemented Interfaces:
Serializable

public class WaitRelease
extends RASM.ChannelBox

Waits for an output channel, chanId, to be released. No wait occurs if the channel has already been released.
Note that there really ought to be a variant form that permits stateless waiting for several channels to complete...

chanId -

See Also:
SignalForward, IsAvailable, Release, Serialized Form

Inner classes inherited from class uk.ac.man.cs.rainbow.simulator.Instruction
Instruction.MACRO
 
Constructor Summary
WaitRelease()
           
WaitRelease(RASMCode code)
           
 
Method Summary
protected  boolean execute(RASMThread thread, Channel chan)
          Perform an operation on the given thread and channel.
 String toString()
           
 
Methods inherited from class uk.ac.man.cs.rainbow.simulator.RASM.ChannelBox
execute
 
Methods inherited from class uk.ac.man.cs.rainbow.simulator.Instruction
addClass, getInstruction, getInstruction, getInstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WaitRelease

public WaitRelease()

WaitRelease

public WaitRelease(RASMCode code)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

execute

protected boolean execute(RASMThread thread,
                          Channel chan)
                   throws RASMThread.Exception
Description copied from class: RASM.ChannelBox
Perform an operation on the given thread and channel. The instruction will be repeated (though with activity going on in other Rainbow threads) until this method returns false. Note that no values should be popped off the stack by this method, and values should only be pushed onto the stack if the method is about to return false.
Overrides:
execute in class RASM.ChannelBox
Following copied from class: uk.ac.man.cs.rainbow.simulator.RASM.ChannelBox
Returns:
true if the instruction is to be repeated by this thread.