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
WaitRelease
public WaitRelease()
WaitRelease
public WaitRelease(RASMCode code)
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.