aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src/thread.rs
diff options
context:
space:
mode:
authorDániel Buga <[email protected]>2023-08-14 08:57:14 +0200
committerDániel Buga <[email protected]>2023-08-14 09:00:08 +0200
commitf6007869bffd3ed4f48e74222dc40d11c7c87ec0 (patch)
treebd8e1afe8d0a959a52ddcb75bdc30988a7d1615e /embassy-executor/src/thread.rs
parent454a7cbf4c0eb3a4e651e7da5512ec49ff7d4050 (diff)
Remove the Pender enum
Diffstat (limited to 'embassy-executor/src/thread.rs')
-rw-r--r--embassy-executor/src/thread.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-executor/src/thread.rs b/embassy-executor/src/thread.rs
index ef703003d..8ff4071da 100644
--- a/embassy-executor/src/thread.rs
+++ b/embassy-executor/src/thread.rs
@@ -2,8 +2,8 @@
2 2
3use core::marker::PhantomData; 3use core::marker::PhantomData;
4 4
5use crate::raw::{OpaqueThreadContext, Pender}; 5use crate::raw::{self, PenderContext};
6use crate::{raw, Spawner}; 6use crate::Spawner;
7 7
8/// Architecture-specific interface for a thread-mode executor. This trait describes what the 8/// Architecture-specific interface for a thread-mode executor. This trait describes what the
9/// executor should do when idle, and what data should be passed to its pender. 9/// executor should do when idle, and what data should be passed to its pender.
@@ -13,7 +13,7 @@ pub trait ThreadContext: Sized {
13 /// 13 ///
14 /// For example, on multi-core systems, this can be used to store the ID of the core that 14 /// For example, on multi-core systems, this can be used to store the ID of the core that
15 /// should be woken up. 15 /// should be woken up.
16 fn context(&self) -> OpaqueThreadContext; 16 fn context(&self) -> PenderContext;
17 17
18 /// Waits for the executor to be waken. 18 /// Waits for the executor to be waken.
19 /// 19 ///
@@ -50,7 +50,7 @@ impl<C: ThreadContext> ThreadModeExecutor<C> {
50 /// Create a new Executor using the given thread context. 50 /// Create a new Executor using the given thread context.
51 pub fn with_context(context: C) -> Self { 51 pub fn with_context(context: C) -> Self {
52 Self { 52 Self {
53 inner: raw::Executor::new(Pender::Thread(context.context())), 53 inner: raw::Executor::new(context.context()),
54 context, 54 context,
55 not_send: PhantomData, 55 not_send: PhantomData,
56 } 56 }