forked from M-Labs/artiq-zynq
runtime: cargo fmt (NFC)
This commit is contained in:
parent
e7614d2e8e
commit
873dd86b4d
|
@ -781,7 +781,7 @@ pub fn main(timer: GlobalTimer, cfg: Config) {
|
||||||
error!("Error loading startup kernel!");
|
error!("Error loading startup kernel!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let cfg = Rc::new(cfg);
|
let cfg = Rc::new(cfg);
|
||||||
let restart_idle = Rc::new(Semaphore::new(1, 1));
|
let restart_idle = Rc::new(Semaphore::new(1, 1));
|
||||||
mgmt::start(cfg.clone(), restart_idle.clone());
|
mgmt::start(cfg.clone(), restart_idle.clone());
|
||||||
|
@ -797,9 +797,9 @@ pub fn main(timer: GlobalTimer, cfg: Config) {
|
||||||
s = (async {
|
s = (async {
|
||||||
TcpStream::accept(1381, 0x10_000, 0x10_000).await.unwrap()
|
TcpStream::accept(1381, 0x10_000, 0x10_000).await.unwrap()
|
||||||
}).fuse() => Some(s),
|
}).fuse() => Some(s),
|
||||||
_ = (async {
|
_ = (async {
|
||||||
restart_idle.async_wait().await;
|
restart_idle.async_wait().await;
|
||||||
can_restart_idle.async_wait().await;
|
can_restart_idle.async_wait().await;
|
||||||
}).fuse() => None
|
}).fuse() => None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -908,7 +908,7 @@ pub fn soft_panic_main(timer: GlobalTimer, cfg: Config) -> ! {
|
||||||
};
|
};
|
||||||
|
|
||||||
Sockets::init(32);
|
Sockets::init(32);
|
||||||
|
|
||||||
let dummy = Rc::new(Semaphore::new(0, 1));
|
let dummy = Rc::new(Semaphore::new(0, 1));
|
||||||
mgmt::start(Rc::new(cfg), dummy);
|
mgmt::start(Rc::new(cfg), dummy);
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,12 @@ async fn read_key(stream: &mut TcpStream) -> Result<String> {
|
||||||
Ok(String::from_utf8(buffer).unwrap())
|
Ok(String::from_utf8(buffer).unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_connection(stream: &mut TcpStream, pull_id: Rc<RefCell<u32>>, cfg: Rc<Config>, restart_idle: Rc<Semaphore>) -> Result<()> {
|
async fn handle_connection(
|
||||||
|
stream: &mut TcpStream,
|
||||||
|
pull_id: Rc<RefCell<u32>>,
|
||||||
|
cfg: Rc<Config>,
|
||||||
|
restart_idle: Rc<Semaphore>,
|
||||||
|
) -> Result<()> {
|
||||||
if !expect(&stream, b"ARTIQ management\n").await? {
|
if !expect(&stream, b"ARTIQ management\n").await? {
|
||||||
return Err(Error::UnexpectedPattern);
|
return Err(Error::UnexpectedPattern);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue