mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-26 03:49:34 +01:00
Merge #113
113: use the single core variant of spsc::Queue r=japaric a=japaric Co-authored-by: Jorge Aparicio <jorge@japaric.io>
This commit is contained in:
commit
5c458fc115
3 changed files with 7 additions and 7 deletions
|
@ -35,9 +35,9 @@ required-features = ["timer-queue"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cortex-m = "0.5.8"
|
cortex-m = "0.5.8"
|
||||||
cortex-m-rt = "0.6.5"
|
cortex-m-rt = "0.6.7"
|
||||||
cortex-m-rtfm-macros = { path = "macros", version = "0.4.0-beta.3" }
|
cortex-m-rtfm-macros = { path = "macros", version = "0.4.0-beta.3" }
|
||||||
heapless = "0.4.0"
|
heapless = "0.4.1"
|
||||||
owned-singleton = "0.1.0"
|
owned-singleton = "0.1.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -1594,13 +1594,13 @@ fn pre_init(ctxt: &Context, app: &App, analysis: &Analysis) -> proc_macro2::Toke
|
||||||
// these are `MaybeUninit` `ReadyQueue`s
|
// these are `MaybeUninit` `ReadyQueue`s
|
||||||
for dispatcher in ctxt.dispatchers.values() {
|
for dispatcher in ctxt.dispatchers.values() {
|
||||||
let rq = &dispatcher.ready_queue;
|
let rq = &dispatcher.ready_queue;
|
||||||
exprs.push(quote!(#rq.set(rtfm::export::ReadyQueue::new());))
|
exprs.push(quote!(#rq.set(rtfm::export::ReadyQueue::new_sc());))
|
||||||
}
|
}
|
||||||
|
|
||||||
// these are `MaybeUninit` `FreeQueue`s
|
// these are `MaybeUninit` `FreeQueue`s
|
||||||
for task in ctxt.tasks.values() {
|
for task in ctxt.tasks.values() {
|
||||||
let fq = &task.free_queue;
|
let fq = &task.free_queue;
|
||||||
exprs.push(quote!(#fq.set(rtfm::export::FreeQueue::new());))
|
exprs.push(quote!(#fq.set(rtfm::export::FreeQueue::new_sc());))
|
||||||
}
|
}
|
||||||
|
|
||||||
// end-of-FIXME
|
// end-of-FIXME
|
||||||
|
|
|
@ -12,13 +12,13 @@ pub use cortex_m::{
|
||||||
};
|
};
|
||||||
pub use cortex_m_rt::{entry, exception};
|
pub use cortex_m_rt::{entry, exception};
|
||||||
pub use heapless::consts;
|
pub use heapless::consts;
|
||||||
use heapless::spsc::Queue;
|
use heapless::spsc::{Queue, SingleCore};
|
||||||
|
|
||||||
#[cfg(feature = "timer-queue")]
|
#[cfg(feature = "timer-queue")]
|
||||||
pub use crate::tq::{isr as sys_tick, NotReady, TimerQueue};
|
pub use crate::tq::{isr as sys_tick, NotReady, TimerQueue};
|
||||||
|
|
||||||
pub type FreeQueue<N> = Queue<u8, N>;
|
pub type FreeQueue<N> = Queue<u8, N, usize, SingleCore>;
|
||||||
pub type ReadyQueue<T, N> = Queue<(T, u8), N>;
|
pub type ReadyQueue<T, N> = Queue<(T, u8), N, usize, SingleCore>;
|
||||||
|
|
||||||
#[cfg(armv7m)]
|
#[cfg(armv7m)]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
|
Loading…
Reference in a new issue