From a3c1522ce64b00c6d310947ebc6dad9fe1e28d55 Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Tue, 9 Aug 2022 16:25:42 -0400 Subject: Add support for rtos-trace behind a feature flag --- embassy-executor/src/lib.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'embassy-executor/src/lib.rs') diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index 69e4aeb4b..dd99f9e52 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs @@ -19,4 +19,25 @@ pub use embassy_macros::{main, task}; /// Implementation details for embassy macros. DO NOT USE. pub mod export { pub use atomic_polyfill as atomic; + + #[cfg(feature = "rtos-trace")] + pub use rtos_trace::trace; + + /// Expands the given block of code when `embassy-executor` is compiled with + /// the `rtos-trace` feature. + #[doc(hidden)] + #[macro_export] + #[cfg(feature = "rtos-trace")] + macro_rules! rtos_trace { + ($($tt:tt)*) => { $($tt)* }; + } + + /// Does not expand the given block of code when `embassy-executor` is + /// compiled without the `rtos-trace` feature. + #[doc(hidden)] + #[macro_export] + #[cfg(not(feature = "rtos-trace"))] + macro_rules! rtos_trace { + ($($tt:tt)*) => {}; + } } -- cgit From 145af0e4ab75d931cba401f1755f383bcc713892 Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Wed, 10 Aug 2022 17:09:11 -0400 Subject: cargo fmt --- embassy-executor/src/lib.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'embassy-executor/src/lib.rs') diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index dd99f9e52..32724c15c 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs @@ -19,7 +19,6 @@ pub use embassy_macros::{main, task}; /// Implementation details for embassy macros. DO NOT USE. pub mod export { pub use atomic_polyfill as atomic; - #[cfg(feature = "rtos-trace")] pub use rtos_trace::trace; -- cgit From 0bf178dd1b11d97f20cb93c5fdb0c779259be0f8 Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Tue, 16 Aug 2022 00:42:08 -0400 Subject: Add separate feature flag to enable interrupt tracing --- embassy-executor/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'embassy-executor/src/lib.rs') diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index 32724c15c..47c0c1d64 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs @@ -23,20 +23,20 @@ pub mod export { pub use rtos_trace::trace; /// Expands the given block of code when `embassy-executor` is compiled with - /// the `rtos-trace` feature. + /// the `rtos-trace-interrupt` feature. #[doc(hidden)] #[macro_export] - #[cfg(feature = "rtos-trace")] - macro_rules! rtos_trace { + #[cfg(feature = "rtos-trace-interrupt")] + macro_rules! rtos_trace_interrupt { ($($tt:tt)*) => { $($tt)* }; } /// Does not expand the given block of code when `embassy-executor` is - /// compiled without the `rtos-trace` feature. + /// compiled without the `rtos-trace-interrupt` feature. #[doc(hidden)] #[macro_export] - #[cfg(not(feature = "rtos-trace"))] - macro_rules! rtos_trace { + #[cfg(not(feature = "rtos-trace-interrupt"))] + macro_rules! rtos_trace_interrupt { ($($tt:tt)*) => {}; } } -- cgit From 478f4727846f6a43c28fff3b09cb639c0b800465 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 22 Aug 2022 15:51:44 +0200 Subject: Remove Forever, switch to static_cell. --- embassy-executor/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'embassy-executor/src/lib.rs') diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index 93f2eaa6d..e4cbd04b9 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs @@ -67,3 +67,9 @@ pub mod raw; mod spawner; pub use spawner::*; + +/// Do not use. Used for macros and HALs only. Not covered by semver guarantees. +#[doc(hidden)] +pub mod _export { + pub use static_cell::StaticCell; +} -- cgit