aboutsummaryrefslogtreecommitdiff
path: root/homogeneous/examples/x-init-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'homogeneous/examples/x-init-2.rs')
-rw-r--r--homogeneous/examples/x-init-2.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/homogeneous/examples/x-init-2.rs b/homogeneous/examples/x-init-2.rs
index f51e2f6e..de35cf6f 100644
--- a/homogeneous/examples/x-init-2.rs
+++ b/homogeneous/examples/x-init-2.rs
@@ -9,30 +9,30 @@ use panic_halt as _;
#[rtfm::app(cores = 2, device = homogeneous)]
const APP: () = {
- extern "C" {
+ struct Resources {
// owned by core #1 but initialized by core #0
- static mut X: u32;
+ x: u32,
// owned by core #0 but initialized by core #1
- static mut Y: u32;
+ y: u32,
}
- #[init(core = 0, late = [X])]
+ #[init(core = 0, late = [x])]
fn a(_: a::Context) -> a::LateResources {
- a::LateResources { X: 0 }
+ a::LateResources { x: 0 }
}
- #[idle(core = 0, resources = [Y])]
+ #[idle(core = 0, resources = [y])]
fn b(_: b::Context) -> ! {
loop {}
}
#[init(core = 1)]
fn c(_: c::Context) -> c::LateResources {
- c::LateResources { Y: 0 }
+ c::LateResources { y: 0 }
}
- #[idle(core = 1, resources = [X])]
+ #[idle(core = 1, resources = [x])]
fn d(_: d::Context) -> ! {
loop {}
}