diff options
| author | Dion Dokter <[email protected]> | 2025-07-15 13:40:30 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-11 14:45:06 +0200 |
| commit | 3f606b28f3b32e9e3b9a9f136eeef52828a78512 (patch) | |
| tree | 640fec12732e7104516c9edbd79261d214887f96 /embassy-executor/src/raw/mod.rs | |
| parent | b5c9e721009fd4331cdc1ce58a07698eb54f2959 (diff) | |
Change deadline to use internal atomics
Diffstat (limited to 'embassy-executor/src/raw/mod.rs')
| -rw-r--r-- | embassy-executor/src/raw/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs index cc43690cb..be2c5ee28 100644 --- a/embassy-executor/src/raw/mod.rs +++ b/embassy-executor/src/raw/mod.rs | |||
| @@ -106,7 +106,7 @@ pub(crate) struct TaskHeader { | |||
| 106 | /// Earliest Deadline First scheduler Deadline. This field should not be accessed | 106 | /// Earliest Deadline First scheduler Deadline. This field should not be accessed |
| 107 | /// outside the context of the task itself as it being polled by the executor. | 107 | /// outside the context of the task itself as it being polled by the executor. |
| 108 | #[cfg(feature = "edf-scheduler")] | 108 | #[cfg(feature = "edf-scheduler")] |
| 109 | pub(crate) deadline: SyncUnsafeCell<u64>, | 109 | pub(crate) deadline: Deadline, |
| 110 | 110 | ||
| 111 | pub(crate) executor: AtomicPtr<SyncExecutor>, | 111 | pub(crate) executor: AtomicPtr<SyncExecutor>, |
| 112 | poll_fn: SyncUnsafeCell<Option<unsafe fn(TaskRef)>>, | 112 | poll_fn: SyncUnsafeCell<Option<unsafe fn(TaskRef)>>, |
| @@ -215,7 +215,7 @@ impl<F: Future + 'static> TaskStorage<F> { | |||
| 215 | // NOTE: The deadline is set to zero to allow the initializer to reside in `.bss`. This | 215 | // NOTE: The deadline is set to zero to allow the initializer to reside in `.bss`. This |
| 216 | // will be lazily initalized in `initialize_impl` | 216 | // will be lazily initalized in `initialize_impl` |
| 217 | #[cfg(feature = "edf-scheduler")] | 217 | #[cfg(feature = "edf-scheduler")] |
| 218 | deadline: SyncUnsafeCell::new(0u64), | 218 | deadline: Deadline::new_unset(), |
| 219 | executor: AtomicPtr::new(core::ptr::null_mut()), | 219 | executor: AtomicPtr::new(core::ptr::null_mut()), |
| 220 | // Note: this is lazily initialized so that a static `TaskStorage` will go in `.bss` | 220 | // Note: this is lazily initialized so that a static `TaskStorage` will go in `.bss` |
| 221 | poll_fn: SyncUnsafeCell::new(None), | 221 | poll_fn: SyncUnsafeCell::new(None), |
