From f0f982facadab2da5d8cdaf214829a9e19f4249e Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 3 Oct 2020 15:30:15 +0200 Subject: Updated documentation to include the critical section token in init --- examples/init.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/init.rs') diff --git a/examples/init.rs b/examples/init.rs index 315969f..1623ca7 100644 --- a/examples/init.rs +++ b/examples/init.rs @@ -23,6 +23,10 @@ const APP: () = { // Safe access to local `static mut` variable let _x: &'static mut u32 = X; + // Access to the critical section token, + // to indicate that this is a critical seciton + let _cs_token: bare_metal::CriticalSection = cx.cs; + hprintln!("init").unwrap(); debug::exit(debug::EXIT_SUCCESS); -- cgit v1.2.3