aboutsummaryrefslogtreecommitdiff
path: root/examples/not-sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/not-sync.rs')
-rw-r--r--examples/not-sync.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/not-sync.rs b/examples/not-sync.rs
index 6b499111..f0f6075e 100644
--- a/examples/not-sync.rs
+++ b/examples/not-sync.rs
@@ -16,21 +16,24 @@ pub struct NotSync {
#[rtfm::app(device = lm3s6965)]
const APP: () = {
- static SHARED: NotSync = NotSync { _0: PhantomData };
+ struct Resources {
+ #[init(NotSync { _0: PhantomData })]
+ shared: NotSync,
+ }
#[init]
fn init(_: init::Context) {
debug::exit(debug::EXIT_SUCCESS);
}
- #[task(resources = [SHARED])]
+ #[task(resources = [shared])]
fn foo(c: foo::Context) {
- let _: &NotSync = c.resources.SHARED;
+ let _: &NotSync = c.resources.shared;
}
- #[task(resources = [SHARED])]
+ #[task(resources = [shared])]
fn bar(c: bar::Context) {
- let _: &NotSync = c.resources.SHARED;
+ let _: &NotSync = c.resources.shared;
}
extern "C" {