diff options
| author | Dániel Buga <[email protected]> | 2023-08-14 15:59:47 +0200 |
|---|---|---|
| committer | Dániel Buga <[email protected]> | 2023-08-14 16:04:11 +0200 |
| commit | 995434614384bc5c218a16a026ce7c06737ca860 (patch) | |
| tree | 961131c33677aad1ec1ff33daf69b716d104ef10 /embassy-executor/src/raw | |
| parent | 3a51e2d9cae6fad2fd903c07634b4a66de59b3bf (diff) | |
Remove interrupt executor, remove PenderContext
Diffstat (limited to 'embassy-executor/src/raw')
| -rw-r--r-- | embassy-executor/src/raw/mod.rs | 17 |
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)] | ||
| 297 | pub 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)] |
| 317 | pub struct Pender(PenderContext); | 310 | pub struct Pender(*mut ()); |
| 318 | 311 | ||
| 319 | unsafe impl Send for Pender {} | 312 | unsafe impl Send for Pender {} |
| 320 | unsafe impl Sync for Pender {} | 313 | unsafe impl Sync for Pender {} |
| @@ -322,7 +315,7 @@ unsafe impl Sync for Pender {} | |||
| 322 | impl Pender { | 315 | impl 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, |
