X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Ffleet%2Finterpreter%2FInbox.java;h=b2dcc8187287e17def9219eccfbfdc5043ed54a7;hb=8051845a0ac645f7629ac7d2c35b61db85d128c4;hp=a1e4769077d6df50b86e4b642e2ec3380f228a29;hpb=3ef9bab9d39b4e7a5d57daa7f549a28c1ef1e19c;p=fleet.git diff --git a/src/edu/berkeley/fleet/interpreter/Inbox.java b/src/edu/berkeley/fleet/interpreter/Inbox.java index a1e4769..b2dcc81 100644 --- a/src/edu/berkeley/fleet/interpreter/Inbox.java +++ b/src/edu/berkeley/fleet/interpreter/Inbox.java @@ -4,7 +4,7 @@ import edu.berkeley.fleet.api.*; import java.util.*; /** this is a generic inbox which stores <32-bit items (tokens or data) */ -public class Inbox extends InstructionBenkoBox { +public class Inbox extends InstructionPump { public boolean dataReadyForShip() { return itemReadyForShip; } public Packet removePacketForShip() { remove(); return register; } @@ -13,7 +13,7 @@ public class Inbox extends InstructionBenkoBox { // private data ////////////////////////////////////////////////////////////////////////////// - private Packet register = null; + private Packet register = new Packet(null, null, 0, null); /** data which has arrived from the switch fabric but not been acted on */ private Queue itemsFromFabric = new LinkedList(); @@ -72,12 +72,12 @@ public class Inbox extends InstructionBenkoBox { // and make note of the fact that we need to send an ack (if requested) if (instruction.tokenOut) - bufferedAck = new Packet(getInterpreter(), this, 0, (InterpreterBenkoBox)instruction.dest); + bufferedAck = new Packet(getInterpreter(), this, 0, (InterpreterDestination)instruction.dest); } else if (instruction.tokenOut) { // if dataOut is not set, we can send the data immediately - new Packet(getInterpreter(), this, 0, (InterpreterBenkoBox)instruction.dest).send(); + new Packet(getInterpreter(), this, 0, (InterpreterDestination)instruction.dest).send(); } return true; }