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/arch/cortex_m.rs | 2 -- embassy-executor/src/arch/riscv32.rs | 2 -- embassy-executor/src/arch/std.rs | 3 --- embassy-executor/src/arch/wasm.rs | 3 --- embassy-executor/src/arch/xtensa.rs | 2 -- 5 files changed, 12 deletions(-) (limited to 'embassy-executor/src/arch') diff --git a/embassy-executor/src/arch/cortex_m.rs b/embassy-executor/src/arch/cortex_m.rs index 6c1300ae5..a29e5b23e 100644 --- a/embassy-executor/src/arch/cortex_m.rs +++ b/embassy-executor/src/arch/cortex_m.rs @@ -21,9 +21,7 @@ mod thread { pub struct Context; impl ThreadContext for Context { - #[cfg(feature = "thread-context")] fn context(&self) -> OpaqueThreadContext { - // Enabling thread-context is not incorrect, just wasteful. OpaqueThreadContext(0) } diff --git a/embassy-executor/src/arch/riscv32.rs b/embassy-executor/src/arch/riscv32.rs index 087204006..976e7bcb3 100644 --- a/embassy-executor/src/arch/riscv32.rs +++ b/embassy-executor/src/arch/riscv32.rs @@ -27,9 +27,7 @@ mod thread { pub struct Context; impl ThreadContext for Context { - #[cfg(feature = "thread-context")] fn context(&self) -> OpaqueThreadContext { - // Enabling thread-context is not incorrect, just wasteful. OpaqueThreadContext(0) } diff --git a/embassy-executor/src/arch/std.rs b/embassy-executor/src/arch/std.rs index 2731e275e..ceaa5c7ab 100644 --- a/embassy-executor/src/arch/std.rs +++ b/embassy-executor/src/arch/std.rs @@ -1,9 +1,6 @@ #[cfg(feature = "executor-interrupt")] compile_error!("`executor-interrupt` is not supported with `arch-std`."); -#[cfg(not(feature = "thread-context"))] -compile_error!("`arch-std` requires `thread-context`."); - #[cfg(feature = "executor-thread")] pub use thread::*; #[cfg(feature = "executor-thread")] diff --git a/embassy-executor/src/arch/wasm.rs b/embassy-executor/src/arch/wasm.rs index e244c0b3f..c393722b2 100644 --- a/embassy-executor/src/arch/wasm.rs +++ b/embassy-executor/src/arch/wasm.rs @@ -1,9 +1,6 @@ #[cfg(feature = "executor-interrupt")] compile_error!("`executor-interrupt` is not supported with `arch-wasm`."); -#[cfg(not(feature = "thread-context"))] -compile_error!("`arch-wasm` requires `thread-context`."); - #[cfg(feature = "executor-thread")] pub use thread::*; #[cfg(feature = "executor-thread")] diff --git a/embassy-executor/src/arch/xtensa.rs b/embassy-executor/src/arch/xtensa.rs index 54c842025..28abf352c 100644 --- a/embassy-executor/src/arch/xtensa.rs +++ b/embassy-executor/src/arch/xtensa.rs @@ -25,9 +25,7 @@ mod thread { pub struct Context; impl ThreadContext for Context { - #[cfg(feature = "thread-context")] fn context(&self) -> OpaqueThreadContext { - // Enabling thread-context is not incorrect, just wasteful. OpaqueThreadContext(0) } -- cgit