mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-19 00:16:29 +08:00
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();
|
network_init();
|
||||||
|
|
||||||
let mut scheduler = sched::Scheduler::new();
|
let mut scheduler = sched::Scheduler::new();
|
||||||
rtio_mgt::startup(&scheduler);
|
rtio_mgt::startup(scheduler.spawner());
|
||||||
scheduler.spawner().spawn(16384, session::thread);
|
scheduler.spawner().spawn(16384, session::thread);
|
||||||
#[cfg(has_rtio_moninj)]
|
#[cfg(has_rtio_moninj)]
|
||||||
scheduler.spawner().spawn(4096, moninj::thread);
|
scheduler.spawner().spawn(4096, moninj::thread);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use config;
|
use config;
|
||||||
use board::csr;
|
use board::csr;
|
||||||
use sched::Scheduler;
|
use sched::Spawner;
|
||||||
|
|
||||||
#[cfg(has_rtio_crg)]
|
#[cfg(has_rtio_crg)]
|
||||||
pub mod crg {
|
pub mod crg {
|
||||||
@ -39,11 +39,11 @@ pub mod crg {
|
|||||||
#[cfg(has_drtio)]
|
#[cfg(has_drtio)]
|
||||||
mod drtio {
|
mod drtio {
|
||||||
use board::csr;
|
use board::csr;
|
||||||
use sched::{Scheduler, Waiter, Spawner};
|
use sched::{Waiter, Spawner};
|
||||||
|
|
||||||
pub fn startup(scheduler: &Scheduler) {
|
pub fn startup(spawner: &Spawner) {
|
||||||
scheduler.spawner().spawn(4096, link_thread);
|
spawner.spawn(4096, link_thread);
|
||||||
scheduler.spawner().spawn(4096, error_thread);
|
spawner.spawn(4096, error_thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn link_is_up() -> bool {
|
fn link_is_up() -> bool {
|
||||||
@ -133,13 +133,13 @@ mod drtio {
|
|||||||
|
|
||||||
#[cfg(not(has_drtio))]
|
#[cfg(not(has_drtio))]
|
||||||
mod drtio {
|
mod drtio {
|
||||||
use sched::Scheduler;
|
use sched::Spawner;
|
||||||
|
|
||||||
pub fn startup(_scheduler: &Scheduler) {}
|
pub fn startup(_spawner: &Spawner) {}
|
||||||
pub fn init() {}
|
pub fn init() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn startup(scheduler: &Scheduler) {
|
pub fn startup(spawner: &Spawner) {
|
||||||
crg::init();
|
crg::init();
|
||||||
|
|
||||||
let mut opt = [b'i'];
|
let mut opt = [b'i'];
|
||||||
@ -165,7 +165,7 @@ pub fn startup(scheduler: &Scheduler) {
|
|||||||
warn!("fix clocking and reset the device");
|
warn!("fix clocking and reset the device");
|
||||||
}
|
}
|
||||||
|
|
||||||
drtio::startup(scheduler);
|
drtio::startup(spawner);
|
||||||
init_core()
|
init_core()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user