From 1b4b006bab7ee05e403a4fc48ae751d037f95b1a Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 21 Apr 2019 20:10:40 +0200 Subject: update examples --- examples/not-sync.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'examples/not-sync.rs') diff --git a/examples/not-sync.rs b/examples/not-sync.rs index d94e0a0..bc71406 100644 --- a/examples/not-sync.rs +++ b/examples/not-sync.rs @@ -10,29 +10,28 @@ extern crate panic_halt; use core::marker::PhantomData; use cortex_m_semihosting::debug; -use rtfm::app; pub struct NotSync { _0: PhantomData<*const ()>, } -#[app(device = lm3s6965)] +#[rtfm::app(device = lm3s6965)] const APP: () = { static SHARED: NotSync = NotSync { _0: PhantomData }; #[init] - fn init() { + fn init(_: init::Context) { debug::exit(debug::EXIT_SUCCESS); } #[task(resources = [SHARED])] - fn foo() { - let _: &NotSync = resources.SHARED; + fn foo(c: foo::Context) { + let _: &NotSync = c.resources.SHARED; } #[task(resources = [SHARED])] - fn bar() { - let _: &NotSync = resources.SHARED; + fn bar(c: bar::Context) { + let _: &NotSync = c.resources.SHARED; } extern "C" { -- cgit v1.2.3