mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
tasks / idle have exclusive access to Threshold, but do not own the token
This commit is contained in:
parent
a2b0c9e0d0
commit
97a7e38db7
10 changed files with 61 additions and 17 deletions
|
|
@ -221,10 +221,10 @@ macro_rules! task {
|
|||
#[allow(non_snake_case)]
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn $NAME() {
|
||||
let f: fn($crate::Threshold, ::$NAME::Resources) = $body;
|
||||
let f: fn(&mut $crate::Threshold, ::$NAME::Resources) = $body;
|
||||
|
||||
f(
|
||||
$crate::Threshold::new(::$NAME::$NAME),
|
||||
&mut $crate::Threshold::new(::$NAME::$NAME),
|
||||
::$NAME::Resources::new(),
|
||||
);
|
||||
}
|
||||
|
|
@ -240,7 +240,7 @@ macro_rules! task {
|
|||
#[no_mangle]
|
||||
pub unsafe extern "C" fn $NAME() {
|
||||
let f: fn(
|
||||
$crate::Threshold,
|
||||
&mut $crate::Threshold,
|
||||
&mut $local,
|
||||
::$NAME::Resources,
|
||||
) = $body;
|
||||
|
|
@ -250,7 +250,7 @@ macro_rules! task {
|
|||
};
|
||||
|
||||
f(
|
||||
$crate::Threshold::new(::$NAME::$NAME),
|
||||
&mut $crate::Threshold::new(::$NAME::$NAME),
|
||||
&mut LOCAL,
|
||||
::$NAME::Resources::new(),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue