diff options
| author | James Munns <[email protected]> | 2025-04-16 15:59:28 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-11 14:45:06 +0200 |
| commit | 0e28ba1091257111f71b76a664d7038dbfcf9b5e (patch) | |
| tree | 34cbdcbecaa2971daaf026f11bece9877e6ac0fd /embassy-executor/src/raw/mod.rs | |
| parent | 3929142f4c08028ea1982e79fd912e1a44900892 (diff) | |
"Deadline Rank Sorted Scheduler" -> "Earliest Deadline First Scheduler"
Diffstat (limited to 'embassy-executor/src/raw/mod.rs')
| -rw-r--r-- | embassy-executor/src/raw/mod.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs index 21dc67b7e..96e7fda74 100644 --- a/embassy-executor/src/raw/mod.rs +++ b/embassy-executor/src/raw/mod.rs | |||
| @@ -28,7 +28,7 @@ pub(crate) mod util; | |||
| 28 | #[cfg_attr(feature = "turbowakers", path = "waker_turbo.rs")] | 28 | #[cfg_attr(feature = "turbowakers", path = "waker_turbo.rs")] |
| 29 | mod waker; | 29 | mod waker; |
| 30 | 30 | ||
| 31 | #[cfg(feature = "drs-scheduler")] | 31 | #[cfg(feature = "edf-scheduler")] |
| 32 | mod deadline; | 32 | mod deadline; |
| 33 | 33 | ||
| 34 | use core::future::Future; | 34 | use core::future::Future; |
| @@ -45,7 +45,7 @@ use embassy_executor_timer_queue::TimerQueueItem; | |||
| 45 | #[cfg(feature = "arch-avr")] | 45 | #[cfg(feature = "arch-avr")] |
| 46 | use portable_atomic::AtomicPtr; | 46 | use portable_atomic::AtomicPtr; |
| 47 | 47 | ||
| 48 | #[cfg(feature = "drs-scheduler")] | 48 | #[cfg(feature = "edf-scheduler")] |
| 49 | pub use deadline::Deadline; | 49 | pub use deadline::Deadline; |
| 50 | #[cfg(feature = "arch-avr")] | 50 | #[cfg(feature = "arch-avr")] |
| 51 | use portable_atomic::AtomicPtr; | 51 | use portable_atomic::AtomicPtr; |
| @@ -105,9 +105,9 @@ pub(crate) struct TaskHeader { | |||
| 105 | pub(crate) state: State, | 105 | pub(crate) state: State, |
| 106 | pub(crate) run_queue_item: RunQueueItem, | 106 | pub(crate) run_queue_item: RunQueueItem, |
| 107 | 107 | ||
| 108 | /// Deadline Rank Scheduler Deadline. This field should not be accessed outside the context of | 108 | /// Earliest Deadline First scheduler Deadline. This field should not be accessed |
| 109 | /// the task itself as it being polled by the executor. | 109 | /// outside the context of the task itself as it being polled by the executor. |
| 110 | #[cfg(feature = "drs-scheduler")] | 110 | #[cfg(feature = "edf-scheduler")] |
| 111 | pub(crate) deadline: SyncUnsafeCell<u64>, | 111 | pub(crate) deadline: SyncUnsafeCell<u64>, |
| 112 | 112 | ||
| 113 | pub(crate) executor: AtomicPtr<SyncExecutor>, | 113 | pub(crate) executor: AtomicPtr<SyncExecutor>, |
| @@ -216,7 +216,7 @@ impl<F: Future + 'static> TaskStorage<F> { | |||
| 216 | run_queue_item: RunQueueItem::new(), | 216 | run_queue_item: RunQueueItem::new(), |
| 217 | // NOTE: The deadline is set to zero to allow the initializer to reside in `.bss`. This | 217 | // NOTE: The deadline is set to zero to allow the initializer to reside in `.bss`. This |
| 218 | // will be lazily initalized in `initialize_impl` | 218 | // will be lazily initalized in `initialize_impl` |
| 219 | #[cfg(feature = "drs-scheduler")] | 219 | #[cfg(feature = "edf-scheduler")] |
| 220 | deadline: SyncUnsafeCell::new(0u64), | 220 | deadline: SyncUnsafeCell::new(0u64), |
| 221 | executor: AtomicPtr::new(core::ptr::null_mut()), | 221 | executor: AtomicPtr::new(core::ptr::null_mut()), |
| 222 | // Note: this is lazily initialized so that a static `TaskStorage` will go in `.bss` | 222 | // Note: this is lazily initialized so that a static `TaskStorage` will go in `.bss` |
| @@ -316,7 +316,7 @@ impl<F: Future + 'static> AvailableTask<F> { | |||
| 316 | 316 | ||
| 317 | // By default, deadlines are set to the maximum value, so that any task WITH | 317 | // By default, deadlines are set to the maximum value, so that any task WITH |
| 318 | // a set deadline will ALWAYS be scheduled BEFORE a task WITHOUT a set deadline | 318 | // a set deadline will ALWAYS be scheduled BEFORE a task WITHOUT a set deadline |
| 319 | #[cfg(feature = "drs-scheduler")] | 319 | #[cfg(feature = "edf-scheduler")] |
| 320 | self.task.raw.deadline.set(deadline::Deadline::UNSET_DEADLINE_TICKS); | 320 | self.task.raw.deadline.set(deadline::Deadline::UNSET_DEADLINE_TICKS); |
| 321 | 321 | ||
| 322 | let task = TaskRef::new(self.task); | 322 | let task = TaskRef::new(self.task); |
