forked from M-Labs/artiq
firmware: pass spawner around instead of scheduler
This commit is contained in:
parent
d3d23d0d3b
commit
7af152ed22
|
@ -129,7 +129,7 @@ pub unsafe extern fn rust_main() {
|
|||
network_init();
|
||||
|
||||
let mut scheduler = sched::Scheduler::new();
|
||||
rtio_mgt::startup(&scheduler);
|
||||
rtio_mgt::startup(scheduler.spawner());
|
||||
scheduler.spawner().spawn(16384, session::thread);
|
||||
#[cfg(has_rtio_moninj)]
|
||||
scheduler.spawner().spawn(4096, moninj::thread);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use config;
|
||||
use board::csr;
|
||||
use sched::Scheduler;
|
||||
use sched::Spawner;
|
||||
|
||||
#[cfg(has_rtio_crg)]
|
||||
pub mod crg {
|
||||
|
@ -39,11 +39,11 @@ pub mod crg {
|
|||
#[cfg(has_drtio)]
|
||||
mod drtio {
|
||||
use board::csr;
|
||||
use sched::{Scheduler, Waiter, Spawner};
|
||||
use sched::{Waiter, Spawner};
|
||||
|
||||
pub fn startup(scheduler: &Scheduler) {
|
||||
scheduler.spawner().spawn(4096, link_thread);
|
||||
scheduler.spawner().spawn(4096, error_thread);
|
||||
pub fn startup(spawner: &Spawner) {
|
||||
spawner.spawn(4096, link_thread);
|
||||
spawner.spawn(4096, error_thread);
|
||||
}
|
||||
|
||||
fn link_is_up() -> bool {
|
||||
|
@ -133,13 +133,13 @@ mod drtio {
|
|||
|
||||
#[cfg(not(has_drtio))]
|
||||
mod drtio {
|
||||
use sched::Scheduler;
|
||||
use sched::Spawner;
|
||||
|
||||
pub fn startup(_scheduler: &Scheduler) {}
|
||||
pub fn startup(_spawner: &Spawner) {}
|
||||
pub fn init() {}
|
||||
}
|
||||
|
||||
pub fn startup(scheduler: &Scheduler) {
|
||||
pub fn startup(spawner: &Spawner) {
|
||||
crg::init();
|
||||
|
||||
let mut opt = [b'i'];
|
||||
|
@ -165,7 +165,7 @@ pub fn startup(scheduler: &Scheduler) {
|
|||
warn!("fix clocking and reset the device");
|
||||
}
|
||||
|
||||
drtio::startup(scheduler);
|
||||
drtio::startup(spawner);
|
||||
init_core()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue