aboutsummaryrefslogtreecommitdiff
path: root/mc/examples/x-schedule.rs
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-06-18 10:31:31 +0200
committerJorge Aparicio <jorge@japaric.io>2019-06-18 10:31:31 +0200
commit9897728709528a02545523bea72576abce89dc4c (patch)
tree49619bfb8e3e09cccbc9c2bd1854abfe1618c8fd /mc/examples/x-schedule.rs
parent81275bfa4f41e2066770087f3a33cad4227eab41 (diff)
add homogeneous multi-core support
Diffstat (limited to 'mc/examples/x-schedule.rs')
-rw-r--r--mc/examples/x-schedule.rs36
1 files changed, 0 insertions, 36 deletions
diff --git a/mc/examples/x-schedule.rs b/mc/examples/x-schedule.rs
deleted file mode 100644
index 76e70ac..0000000
--- a/mc/examples/x-schedule.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-#![no_main]
-#![no_std]
-
-use panic_halt as _;
-
-#[rtfm::app(cores = 2, device = mc, monotonic = mc::MT)]
-const APP: () = {
- #[init(core = 0, spawn = [ping])]
- fn init(c: init::Context) {
- c.spawn.ping().ok();
- }
-
- #[task(core = 0, schedule = [ping])]
- fn pong(c: pong::Context) {
- c.schedule.ping(c.scheduled + 1_000_000).ok();
- }
-
- #[task(core = 1, schedule = [pong])]
- fn ping(c: ping::Context) {
- c.schedule.pong(c.scheduled + 1_000_000).ok();
- }
-
- extern "C" {
- #[core = 0]
- fn I0();
-
- #[core = 0]
- fn I1();
-
- #[core = 1]
- fn I0();
-
- #[core = 1]
- fn I1();
- }
-};