aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src/raw
diff options
context:
space:
mode:
authorDániel Buga <[email protected]>2023-08-14 15:59:47 +0200
committerDániel Buga <[email protected]>2023-08-14 16:04:11 +0200
commit995434614384bc5c218a16a026ce7c06737ca860 (patch)
tree961131c33677aad1ec1ff33daf69b716d104ef10 /embassy-executor/src/raw
parent3a51e2d9cae6fad2fd903c07634b4a66de59b3bf (diff)
Remove interrupt executor, remove PenderContext
Diffstat (limited to 'embassy-executor/src/raw')
-rw-r--r--embassy-executor/src/raw/mod.rs17
1 files changed, 5 insertions, 12 deletions
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs
index 2bbbb132c..aa99b4cf3 100644
--- a/embassy-executor/src/raw/mod.rs
+++ b/embassy-executor/src/raw/mod.rs
@@ -291,11 +291,6 @@ impl<F: Future + 'static, const N: usize> TaskPool<F, N> {
291 } 291 }
292} 292}
293 293
294/// Context given to the thread-mode executor's pender.
295#[repr(transparent)]
296#[derive(Clone, Copy)]
297pub struct PenderContext(*mut ());
298
299/// Platform/architecture-specific action executed when an executor has pending work. 294/// Platform/architecture-specific action executed when an executor has pending work.
300/// 295///
301/// When a task within an executor is woken, the `Pender` is called. This does a 296/// When a task within an executor is woken, the `Pender` is called. This does a
@@ -306,15 +301,13 @@ pub struct PenderContext(*mut ());
306/// 301///
307/// Platform/architecture implementations must provide a function that can be referred to as: 302/// Platform/architecture implementations must provide a function that can be referred to as:
308/// 303///
309/// ```rust 304/// ```rust///
310/// use embassy_executor::raw::PenderContext;
311///
312/// extern "Rust" { 305/// extern "Rust" {
313/// fn __pender(context: PenderContext); 306/// fn __pender(context: *mut ());
314/// } 307/// }
315/// ``` 308/// ```
316#[derive(Clone, Copy)] 309#[derive(Clone, Copy)]
317pub struct Pender(PenderContext); 310pub struct Pender(*mut ());
318 311
319unsafe impl Send for Pender {} 312unsafe impl Send for Pender {}
320unsafe impl Sync for Pender {} 313unsafe impl Sync for Pender {}
@@ -322,7 +315,7 @@ unsafe impl Sync for Pender {}
322impl Pender { 315impl Pender {
323 pub(crate) fn pend(self) { 316 pub(crate) fn pend(self) {
324 extern "Rust" { 317 extern "Rust" {
325 fn __pender(context: PenderContext); 318 fn __pender(context: *mut ());
326 } 319 }
327 unsafe { __pender(self.0) }; 320 unsafe { __pender(self.0) };
328 } 321 }
@@ -484,7 +477,7 @@ impl Executor {
484 /// When the executor has work to do, it will call the [`Pender`]. 477 /// When the executor has work to do, it will call the [`Pender`].
485 /// 478 ///
486 /// See [`Executor`] docs for details on `Pender`. 479 /// See [`Executor`] docs for details on `Pender`.
487 pub fn new(context: PenderContext) -> Self { 480 pub fn new(context: *mut ()) -> Self {
488 Self { 481 Self {
489 inner: SyncExecutor::new(Pender(context)), 482 inner: SyncExecutor::new(Pender(context)),
490 _not_sync: PhantomData, 483 _not_sync: PhantomData,