aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src/lib.rs
diff options
context:
space:
mode:
authorQuentin Smith <[email protected]>2022-08-09 16:25:42 -0400
committerQuentin Smith <[email protected]>2022-08-10 05:04:13 -0400
commita3c1522ce64b00c6d310947ebc6dad9fe1e28d55 (patch)
treebe394a8985abb71dc3f16f815102360cf4befbbd /embassy-executor/src/lib.rs
parentb7b4c84067e0e85fa641a540458438297176f2e4 (diff)
Add support for rtos-trace behind a feature flag
Diffstat (limited to 'embassy-executor/src/lib.rs')
-rw-r--r--embassy-executor/src/lib.rs21
1 files changed, 21 insertions, 0 deletions
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};
19/// Implementation details for embassy macros. DO NOT USE. 19/// Implementation details for embassy macros. DO NOT USE.
20pub mod export { 20pub mod export {
21 pub use atomic_polyfill as atomic; 21 pub use atomic_polyfill as atomic;
22
23 #[cfg(feature = "rtos-trace")]
24 pub use rtos_trace::trace;
25
26 /// Expands the given block of code when `embassy-executor` is compiled with
27 /// the `rtos-trace` feature.
28 #[doc(hidden)]
29 #[macro_export]
30 #[cfg(feature = "rtos-trace")]
31 macro_rules! rtos_trace {
32 ($($tt:tt)*) => { $($tt)* };
33 }
34
35 /// Does not expand the given block of code when `embassy-executor` is
36 /// compiled without the `rtos-trace` feature.
37 #[doc(hidden)]
38 #[macro_export]
39 #[cfg(not(feature = "rtos-trace"))]
40 macro_rules! rtos_trace {
41 ($($tt:tt)*) => {};
42 }
22} 43}