diff options
author | 2019-06-13 23:56:59 +0200 | |
---|---|---|
committer | 2019-06-13 23:56:59 +0200 | |
commit | 81275bfa4f41e2066770087f3a33cad4227eab41 (patch) | |
tree | c779a68e7cecf4c2613c7593376f980cea5dbc05 /examples/t-resource.rs | |
parent | fafeeb27270ef24fc3852711c6032f65aa7dbcc0 (diff) | |
download | rtic-81275bfa4f41e2066770087f3a33cad4227eab41.tar.gz rtic-81275bfa4f41e2066770087f3a33cad4227eab41.tar.zst rtic-81275bfa4f41e2066770087f3a33cad4227eab41.zip |
rtfm-syntax refactor + heterogeneous multi-core support
Diffstat (limited to '')
-rw-r--r-- | examples/t-resource.rs (renamed from tests/cpass/resource.rs) | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/cpass/resource.rs b/examples/t-resource.rs index 4e92a032..40dc2a65 100644 --- a/tests/cpass/resource.rs +++ b/examples/t-resource.rs @@ -1,15 +1,11 @@ -//! Check code generation of resources +//! [compile-pass] Check code generation of resources #![deny(unsafe_code)] #![deny(warnings)] #![no_main] #![no_std] -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::Exclusive; +use panic_halt as _; #[rtfm::app(device = lm3s6965)] const APP: () = { @@ -61,10 +57,10 @@ const APP: () = { let _: &mut u32 = c.resources.O3; // no `Mutex` proxy when access from highest priority task - let _: Exclusive<u32> = c.resources.S1; + let _: &mut u32 = c.resources.S1; // no `Mutex` proxy when co-owned by cooperative (same priority) tasks - let _: Exclusive<u32> = c.resources.S2; + let _: &mut u32 = c.resources.S2; // `&` if read-only let _: &u32 = c.resources.S3; @@ -76,6 +72,6 @@ const APP: () = { let _: &u32 = c.resources.O5; // no `Mutex` proxy when co-owned by cooperative (same priority) tasks - let _: Exclusive<u32> = c.resources.S2; + let _: &mut u32 = c.resources.S2; } }; |