Kernel: Added startup kernel. #43
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#43
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "pca006132/artiq-zynq:master"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Added startup kernel. It would load the kernel file declared in the config, and only start to receive connections after the startup kernel is finished.
@ -127,1 +128,4 @@
kernel::Message::RpcSend { is_async, data } => {
// if there is RPC for the kernel, stream must not be None,
if stream.is_none() {
panic!("Stream must not be none for kernels running RPC!");
I would not panic here, instead report with
error!
and terminate the offending kernel.@ -94,2 +96,4 @@
Ok(String::from_utf8(self.read(key)?)?)
}
pub fn read_file_from_key<'b>(&self, key: &'b str) -> Result<'b, Vec<u8>> {
Use
read
instead as discussed.@ -125,3 +126,4 @@
let reply = control.borrow_mut().rx.async_recv().await;
match *reply {
kernel::Message::RpcSend { is_async, data } => {
// if there is RPC for the kernel, stream must not be None,
This comment doesn't say anything that isn't obvious from the lines below - please remove it.
@ -300,0 +343,4 @@
let _ = task::block_on(handle_run_kernel(None, &control));
info!("Startup kernel finished!");
} else {
info!("Error loading startup kernel!");
That should be
error!
.