diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-08-17 23:40:16 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-08-18 01:22:30 +0200 |
| commit | 5daa173ce4b153a532b4daa9e94c7a248231f25b (patch) | |
| tree | 2ef0b4d6f9b1c02dac2589e7b57982c20cbc0e66 /embassy-executor/src/executor/mod.rs | |
| parent | 1c5b54a4823d596db730eb476c3ab78110557214 (diff) | |
Split embassy-time from embassy-executor.
Diffstat (limited to 'embassy-executor/src/executor/mod.rs')
| -rw-r--r-- | embassy-executor/src/executor/mod.rs | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/embassy-executor/src/executor/mod.rs b/embassy-executor/src/executor/mod.rs deleted file mode 100644 index 45d00c568..000000000 --- a/embassy-executor/src/executor/mod.rs +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | //! Async task executor. | ||
| 2 | //! | ||
| 3 | //! This module provides an async/await executor designed for embedded usage. | ||
| 4 | //! | ||
| 5 | //! - No `alloc`, no heap needed. Task futures are statically allocated. | ||
| 6 | //! - No "fixed capacity" data structures, executor works with 1 or 1000 tasks without needing config/tuning. | ||
| 7 | //! - Integrated timer queue: sleeping is easy, just do `Timer::after(Duration::from_secs(1)).await;`. | ||
| 8 | //! - No busy-loop polling: CPU sleeps when there's no work to do, using interrupts or `WFE/SEV`. | ||
| 9 | //! - Efficient polling: a wake will only poll the woken task, not all of them. | ||
| 10 | //! - Fair: a task can't monopolize CPU time even if it's constantly being woken. All other tasks get a chance to run before a given task gets polled for the second time. | ||
| 11 | //! - Creating multiple executor instances is supported, to run tasks with multiple priority levels. This allows higher-priority tasks to preempt lower-priority tasks. | ||
| 12 | |||
| 13 | cfg_if::cfg_if! { | ||
| 14 | if #[cfg(cortex_m)] { | ||
| 15 | #[path="arch/cortex_m.rs"] | ||
| 16 | mod arch; | ||
| 17 | pub use arch::*; | ||
| 18 | } | ||
| 19 | else if #[cfg(target_arch="riscv32")] { | ||
| 20 | #[path="arch/riscv32.rs"] | ||
| 21 | mod arch; | ||
| 22 | pub use arch::*; | ||
| 23 | } | ||
| 24 | else if #[cfg(all(target_arch="xtensa", feature = "nightly"))] { | ||
| 25 | #[path="arch/xtensa.rs"] | ||
| 26 | mod arch; | ||
| 27 | pub use arch::*; | ||
| 28 | } | ||
| 29 | else if #[cfg(feature="wasm")] { | ||
| 30 | #[path="arch/wasm.rs"] | ||
| 31 | mod arch; | ||
| 32 | pub use arch::*; | ||
| 33 | } | ||
| 34 | else if #[cfg(feature="std")] { | ||
| 35 | #[path="arch/std.rs"] | ||
| 36 | mod arch; | ||
| 37 | pub use arch::*; | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | pub mod raw; | ||
| 42 | |||
| 43 | mod spawner; | ||
| 44 | pub use spawner::*; | ||
