diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2023-01-23 20:05:47 +0100 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2023-03-01 00:33:31 +0100 |
| commit | 306aa47170fd59369b7a184924e287dc3706d64d (patch) | |
| tree | 75a331a63a4021f078e330bf2ce4edb1228e2ecf /macros/ui/shared-lock-free.rs | |
| parent | b8b881f446a226d6f3c4a7db7c9174590b47dbf6 (diff) | |
Add rtic-timer (timerqueue + monotonic) and rtic-monotonics (systick-monotonic)
Diffstat (limited to 'macros/ui/shared-lock-free.rs')
| -rw-r--r-- | macros/ui/shared-lock-free.rs | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/macros/ui/shared-lock-free.rs b/macros/ui/shared-lock-free.rs deleted file mode 100644 index b3a4b9c..0000000 --- a/macros/ui/shared-lock-free.rs +++ /dev/null @@ -1,38 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[shared] - struct Shared { - // An exclusive, early resource - #[lock_free] - e1: u32, - - // An exclusive, late resource - #[lock_free] - e2: u32, - } - - #[local] - struct Local {} - - #[init] - fn init(_: init::Context) -> (Shared, Local) {} - - // e2 ok - #[idle(shared = [e2])] - fn idle(cx: idle::Context) -> ! { - debug::exit(debug::EXIT_SUCCESS); - loop {} - } - - // e1 rejected (not lock_free) - #[task(binds = UART0, priority = 1, shared = [e1])] - fn uart0(cx: uart0::Context) { - *cx.resources.e1 += 10; - } - - // e1 rejected (not lock_free) - #[task(binds = UART1, priority = 2, shared = [e1])] - fn uart1(cx: uart1::Context) {} -} |
