From ec6bd27df6101bc5f77fa4eace0e8963970231ad Mon Sep 17 00:00:00 2001 From: Dániel Buga Date: Mon, 14 Aug 2023 08:22:22 +0200 Subject: Remove thread-context feature --- embassy-executor/src/thread.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'embassy-executor/src/thread.rs') diff --git a/embassy-executor/src/thread.rs b/embassy-executor/src/thread.rs index f977d41e7..ef703003d 100644 --- a/embassy-executor/src/thread.rs +++ b/embassy-executor/src/thread.rs @@ -13,7 +13,6 @@ pub trait ThreadContext: Sized { /// /// For example, on multi-core systems, this can be used to store the ID of the core that /// should be woken up. - #[cfg(feature = "thread-context")] fn context(&self) -> OpaqueThreadContext; /// Waits for the executor to be waken. @@ -49,16 +48,10 @@ impl ThreadModeExecutor { } /// Create a new Executor using the given thread context. - pub fn with_context(thread_context: C) -> Self { - #[cfg(not(feature = "thread-context"))] - let context = OpaqueThreadContext(()); - - #[cfg(feature = "thread-context")] - let context = thread_context.context(); - + pub fn with_context(context: C) -> Self { Self { - inner: raw::Executor::new(Pender::Thread(context)), - context: thread_context, + inner: raw::Executor::new(Pender::Thread(context.context())), + context, not_send: PhantomData, } } -- cgit