diff --git a/src/runtime2/component/control_layer.rs b/src/runtime2/component/control_layer.rs index b7ad2c40b907deac5b614da1e0cba99181993434..da6a34d2932f0cdf9a8f072b5966d0fdc47481a3 100644 --- a/src/runtime2/component/control_layer.rs +++ b/src/runtime2/component/control_layer.rs @@ -25,6 +25,7 @@ enum ControlContent { PeerChange(ContentPeerChange), ScheduleComponent(CompId), ClosedPort(PortId), + UnblockPutWithPorts } struct ContentPeerChange { @@ -45,6 +46,7 @@ pub(crate) enum AckAction { None, SendMessage(CompId, ControlMessage), ScheduleComponent(CompId), + UnblockPutWithPorts, } /// Handling/sending control messages. @@ -128,6 +130,9 @@ impl ControlLayer { comp_ctx.change_port_peer(sched_ctx, port_handle, None); return (AckAction::None, None); + }, + ControlContent::UnblockPutWithPorts => { + return (AckAction::UnblockPutWithPorts, None); } } } @@ -152,6 +157,18 @@ impl ControlLayer { return entry_id; } + /// Adds an entry that returns the similarly named Ack action + pub(crate) fn add_unblock_put_with_ports_entry(&mut self) -> ControlId { + let entry_id = self.take_id(); + self.entries.push(ControlEntry{ + id: entry_id, + ack_countdown: 1, // incremented by calls to `add_reroute_entry` + content: ControlContent::UnblockPutWithPorts, + }); + + return entry_id; + } + /// Removes a schedule entry. Only used if the caller preemptively called /// `add_schedule_entry`, but ended up not calling `add_reroute_entry`, /// hence the `ack_countdown` in the scheduling entry is at 0.