mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Multilock support
This commit is contained in:
parent
2ebd81fee2
commit
243668df54
7 changed files with 85 additions and 2 deletions
|
|
@ -105,6 +105,7 @@ pub fn codegen(
|
|||
#[allow(non_snake_case)]
|
||||
fn #name(#(#locals_pat,)* #context: #name::Context) {
|
||||
use rtic::Mutex as _;
|
||||
use rtic::mutex_prelude::*;
|
||||
|
||||
#(#stmts)*
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ pub fn codegen(
|
|||
#[allow(non_snake_case)]
|
||||
fn #name(#(#locals_pat,)* #context: #name::Context) -> ! {
|
||||
use rtic::Mutex as _;
|
||||
use rtic::mutex_prelude::*;
|
||||
|
||||
#(#stmts)*
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@ pub fn codegen(
|
|||
pub fn spawn(#(#args,)*) -> Result<(), #ty> {
|
||||
// #let_instant // do we need it?
|
||||
use rtic::Mutex as _;
|
||||
use rtic::mutex_prelude::*;
|
||||
|
||||
let input = #tupled;
|
||||
|
||||
|
|
@ -258,6 +259,7 @@ pub fn codegen(
|
|||
) -> Result<(), #ty> {
|
||||
unsafe {
|
||||
use rtic::Mutex as _;
|
||||
use rtic::mutex_prelude::*;
|
||||
|
||||
let input = #tupled;
|
||||
if let Some(index) = rtic::export::interrupt::free(|_| #app_path::#fq.dequeue()) {
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ pub fn codegen(
|
|||
#[allow(non_snake_case)]
|
||||
fn #name(#(#locals_pat,)* #context: #name::Context #(,#inputs)*) {
|
||||
use rtic::Mutex as _;
|
||||
use rtic::mutex_prelude::*;
|
||||
|
||||
#(#stmts)*
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue