diff options
| author | Quentin Smith <[email protected]> | 2022-08-19 00:53:06 -0400 |
|---|---|---|
| committer | Quentin Smith <[email protected]> | 2022-08-19 00:53:41 -0400 |
| commit | 71e468681b1c074e06276d34ff00e36169c632f5 (patch) | |
| tree | ce86220caabbdc044720df8efb23de7bc4c36ea0 /embassy-executor/src/lib.rs | |
| parent | 2edf532f8d8ce048137990bf74b07759428ed7c1 (diff) | |
| parent | aefa5275a2ab2cac6caef599e7adb76ce1beeddd (diff) | |
Merge branch 'master' of https://github.com/embassy-rs/embassy into rtos-trace
Diffstat (limited to 'embassy-executor/src/lib.rs')
| -rw-r--r-- | embassy-executor/src/lib.rs | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index 47c0c1d64..93f2eaa6d 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs | |||
| @@ -1,24 +1,46 @@ | |||
| 1 | #![cfg_attr(not(any(feature = "std", feature = "wasm")), no_std)] | 1 | #![cfg_attr(not(any(feature = "std", feature = "wasm")), no_std)] |
| 2 | #![cfg_attr(feature = "nightly", feature(generic_associated_types, type_alias_impl_trait))] | ||
| 3 | #![cfg_attr(all(feature = "nightly", target_arch = "xtensa"), feature(asm_experimental_arch))] | 2 | #![cfg_attr(all(feature = "nightly", target_arch = "xtensa"), feature(asm_experimental_arch))] |
| 4 | #![allow(clippy::new_without_default)] | 3 | #![allow(clippy::new_without_default)] |
| 5 | #![doc = include_str!("../../README.md")] | 4 | #![doc = include_str!("../README.md")] |
| 6 | #![warn(missing_docs)] | 5 | #![warn(missing_docs)] |
| 7 | 6 | ||
| 8 | // This mod MUST go first, so that the others see its macros. | 7 | // This mod MUST go first, so that the others see its macros. |
| 9 | pub(crate) mod fmt; | 8 | pub(crate) mod fmt; |
| 10 | 9 | ||
| 11 | pub mod executor; | ||
| 12 | #[cfg(feature = "time")] | ||
| 13 | pub mod time; | ||
| 14 | |||
| 15 | #[cfg(feature = "nightly")] | 10 | #[cfg(feature = "nightly")] |
| 16 | pub use embassy_macros::{main, task}; | 11 | pub use embassy_macros::{main, task}; |
| 17 | 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 | |||
| 18 | #[doc(hidden)] | 41 | #[doc(hidden)] |
| 19 | /// Implementation details for embassy macros. DO NOT USE. | 42 | /// Implementation details for embassy macros. DO NOT USE. |
| 20 | pub mod export { | 43 | pub mod export { |
| 21 | pub use atomic_polyfill as atomic; | ||
| 22 | #[cfg(feature = "rtos-trace")] | 44 | #[cfg(feature = "rtos-trace")] |
| 23 | pub use rtos_trace::trace; | 45 | pub use rtos_trace::trace; |
| 24 | 46 | ||
| @@ -40,3 +62,8 @@ pub mod export { | |||
| 40 | ($($tt:tt)*) => {}; | 62 | ($($tt:tt)*) => {}; |
| 41 | } | 63 | } |
| 42 | } | 64 | } |
| 65 | |||
| 66 | pub mod raw; | ||
| 67 | |||
| 68 | mod spawner; | ||
| 69 | pub use spawner::*; | ||
