mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-25 19:39:32 +01:00
schedule now works with RacyCell
This commit is contained in:
parent
c70191c019
commit
3ace49f3eb
2 changed files with 3 additions and 2 deletions
|
@ -304,8 +304,9 @@ pub fn codegen(
|
||||||
) -> Result<(), #ty> {
|
) -> Result<(), #ty> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let input = #tupled;
|
let input = #tupled;
|
||||||
if let Some(index) = rtic::export::interrupt::free(|_| #app_path::#fq.dequeue()) {
|
if let Some(index) = rtic::export::interrupt::free(|_| #app_path::#fq.get_mut_unchecked().dequeue()) {
|
||||||
#app_path::#inputs
|
#app_path::#inputs
|
||||||
|
.get_mut_unchecked()
|
||||||
.get_unchecked_mut(usize::from(index))
|
.get_unchecked_mut(usize::from(index))
|
||||||
.as_mut_ptr()
|
.as_mut_ptr()
|
||||||
.write(input);
|
.write(input);
|
||||||
|
|
|
@ -107,7 +107,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
||||||
quote!(
|
quote!(
|
||||||
#(#cfgs)*
|
#(#cfgs)*
|
||||||
#t::#name => {
|
#t::#name => {
|
||||||
rtic::export::interrupt::free(|_| #rq.split().0.enqueue_unchecked((#rqt::#name, index)));
|
rtic::export::interrupt::free(|_| #rq.get_mut_unchecked().split().0.enqueue_unchecked((#rqt::#name, index)));
|
||||||
|
|
||||||
#pend
|
#pend
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue