diff options
author | 2017-07-18 20:03:22 -0500 | |
---|---|---|
committer | 2017-07-18 20:03:22 -0500 | |
commit | 97a7e38db7eb0643a6334aba30077622d09e5c85 (patch) | |
tree | a561e574a8cb36b748c84f69ee679fe0e61f1899 /src | |
parent | a2b0c9e0d077870441ecdea00108c3a3a394fd9b (diff) | |
download | rtic-97a7e38db7eb0643a6334aba30077622d09e5c85.tar.gz rtic-97a7e38db7eb0643a6334aba30077622d09e5c85.tar.zst rtic-97a7e38db7eb0643a6334aba30077622d09e5c85.zip |
tasks / idle have exclusive access to Threshold, but do not own the token
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 4 insertions, 4 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(), ); |