executor: unify export mod.

This commit is contained in:
Dario Nieuwenhuis 2023-04-03 01:11:42 +02:00
parent cd2ed065dc
commit b41ee47115
2 changed files with 6 additions and 10 deletions

View File

@ -46,11 +46,13 @@ cfg_if::cfg_if! {
}
}
/// Implementation details for embassy macros.
/// Do not use. Used for macros and HALs only. Not covered by semver guarantees.
#[doc(hidden)]
/// Implementation details for embassy macros. DO NOT USE.
pub mod export {
pub mod _export {
#[cfg(feature = "rtos-trace")]
pub use rtos_trace::trace;
pub use static_cell::StaticCell;
/// Expands the given block of code when `embassy-executor` is compiled with
/// the `rtos-trace-interrupt` feature.
@ -75,9 +77,3 @@ 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;
}

View File

@ -10,12 +10,12 @@ pub fn run(name: syn::Ident) -> Result<TokenStream, TokenStream> {
let (isr_enter, isr_exit) = (
quote! {
::embassy_executor::rtos_trace_interrupt! {
::embassy_executor::export::trace::isr_enter();
::embassy_executor::_export::trace::isr_enter();
}
},
quote! {
::embassy_executor::rtos_trace_interrupt! {
::embassy_executor::export::trace::isr_exit();
::embassy_executor::_export::trace::isr_exit();
}
},
);