mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-26 19:58:25 +08:00
runtime mgmt: minor fix
This commit is contained in:
parent
a2d341f4d6
commit
28654501af
@ -1,11 +1,8 @@
|
|||||||
use log::{self, LevelFilter};
|
use core::cell::{Cell, RefCell};
|
||||||
use core::cell::Cell;
|
|
||||||
use core::cell::RefCell;
|
|
||||||
|
|
||||||
use board_artiq::drtio_routing::RoutingTable;
|
use board_artiq::drtio_routing::RoutingTable;
|
||||||
use io::{ProtoRead, Write, Error as IoError};
|
use io::{ProtoRead, Write, Error as IoError};
|
||||||
use mgmt_proto::*;
|
use mgmt_proto::*;
|
||||||
use sched::{Io, TcpListener, TcpStream, Error as SchedError};
|
|
||||||
use sched::{Io, Mutex, TcpListener, TcpStream, Error as SchedError};
|
use sched::{Io, Mutex, TcpListener, TcpStream, Error as SchedError};
|
||||||
use urc::Urc;
|
use urc::Urc;
|
||||||
|
|
||||||
@ -102,7 +99,7 @@ mod local_coremgmt {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn config_write(_io: &Io, stream: &mut TcpStream, key: &String, value: &Vec<u8>, restart_idle: &Urc<Cell<bool>>) -> Result<(), Error<SchedError>> {
|
pub fn config_write(io: &Io, stream: &mut TcpStream, key: &String, value: &Vec<u8>, restart_idle: &Urc<Cell<bool>>) -> Result<(), Error<SchedError>> {
|
||||||
match config::write(key, value) {
|
match config::write(key, value) {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
if key == "idle_kernel" {
|
if key == "idle_kernel" {
|
||||||
@ -116,7 +113,7 @@ mod local_coremgmt {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn config_remove(_io: &Io, stream: &mut TcpStream, key: &String, restart_idle: &Urc<Cell<bool>>) -> Result<(), Error<SchedError>> {
|
pub fn config_remove(io: &Io, stream: &mut TcpStream, key: &String, restart_idle: &Urc<Cell<bool>>) -> Result<(), Error<SchedError>> {
|
||||||
match config::remove(key) {
|
match config::remove(key) {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
if key == "idle_kernel" {
|
if key == "idle_kernel" {
|
||||||
@ -130,7 +127,7 @@ mod local_coremgmt {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn config_erase(_io: &Io, stream: &mut TcpStream, restart_idle: &Urc<Cell<bool>>) -> Result<(), Error<SchedError>> {
|
pub fn config_erase(io: &Io, stream: &mut TcpStream, restart_idle: &Urc<Cell<bool>>) -> Result<(), Error<SchedError>> {
|
||||||
match config::erase() {
|
match config::erase() {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
io.until(|| !restart_idle.get())?;
|
io.until(|| !restart_idle.get())?;
|
||||||
@ -603,7 +600,7 @@ macro_rules! process {
|
|||||||
|
|
||||||
fn worker(io: &Io, stream: &mut TcpStream, restart_idle: &Urc<Cell<bool>>,
|
fn worker(io: &Io, stream: &mut TcpStream, restart_idle: &Urc<Cell<bool>>,
|
||||||
_aux_mutex: &Mutex, _ddma_mutex: &Mutex, _subkernel_mutex: &Mutex,
|
_aux_mutex: &Mutex, _ddma_mutex: &Mutex, _subkernel_mutex: &Mutex,
|
||||||
_routing_table: &RoutingTable, stream: &mut TcpStream) -> Result<(), Error<SchedError>> {
|
_routing_table: &RoutingTable) -> Result<(), Error<SchedError>> {
|
||||||
read_magic(stream)?;
|
read_magic(stream)?;
|
||||||
let _destination = stream.read_u8()?;
|
let _destination = stream.read_u8()?;
|
||||||
Write::write_all(stream, "e".as_bytes())?;
|
Write::write_all(stream, "e".as_bytes())?;
|
||||||
|
Loading…
Reference in New Issue
Block a user