Kernel: Added startup kernel. #43

Merged
sb10q merged 1 commits from pca006132/artiq-zynq:master into master 2020-07-08 15:55:27 +08:00

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.

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.
sb10q reviewed 2020-07-08 14:59:56 +08:00
@ -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.

I would not panic here, instead report with ``error!`` and terminate the offending kernel.
sb10q reviewed 2020-07-08 15:05:12 +08:00
@ -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.

Use ``read`` instead as discussed.
sb10q reviewed 2020-07-08 15:07:20 +08:00
@ -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.

This comment doesn't say anything that isn't obvious from the lines below - please remove it.
sb10q reviewed 2020-07-08 15:41:00 +08:00
@ -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!.

That should be ``error!``.
sb10q closed this pull request 2020-07-08 15:55:27 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#43
There is no content yet.