diff options
| author | Dániel Buga <[email protected]> | 2024-12-16 18:56:42 +0100 |
|---|---|---|
| committer | Dániel Buga <[email protected]> | 2024-12-16 20:37:01 +0100 |
| commit | fbd0fe06bde7949d3374d10e540291493e088314 (patch) | |
| tree | bde07ef3faf6be397bd61ac61327f5e6de9b765d /embassy-executor/src/raw | |
| parent | c9f32b7e3667f29c4ab15d4dbab37acdb471d0ed (diff) | |
Remove special handling of integrated timer items
Diffstat (limited to 'embassy-executor/src/raw')
| -rw-r--r-- | embassy-executor/src/raw/mod.rs | 23 | ||||
| -rw-r--r-- | embassy-executor/src/raw/timer_queue.rs | 11 |
2 files changed, 0 insertions, 34 deletions
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs index 997db6756..bdd5ff5ae 100644 --- a/embassy-executor/src/raw/mod.rs +++ b/embassy-executor/src/raw/mod.rs | |||
| @@ -96,29 +96,6 @@ impl TaskRef { | |||
| 96 | &self.header().timer_queue_item | 96 | &self.header().timer_queue_item |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | /// Mark the task as timer-queued. Return whether it should be actually enqueued | ||
| 100 | /// using `_embassy_time_schedule_wake`. | ||
| 101 | /// | ||
| 102 | /// Entering this state prevents the task from being respawned while in a timer queue. | ||
| 103 | /// | ||
| 104 | /// Safety: | ||
| 105 | /// | ||
| 106 | /// This functions should only be called by the timer queue driver, before | ||
| 107 | /// enqueueing the timer item. | ||
| 108 | pub unsafe fn timer_enqueue(&self) -> timer_queue::TimerEnqueueOperation { | ||
| 109 | self.header().state.timer_enqueue() | ||
| 110 | } | ||
| 111 | |||
| 112 | /// Unmark the task as timer-queued. | ||
| 113 | /// | ||
| 114 | /// Safety: | ||
| 115 | /// | ||
| 116 | /// This functions should only be called by the timer queue implementation, after the task has | ||
| 117 | /// been removed from the timer queue. | ||
| 118 | pub unsafe fn timer_dequeue(&self) { | ||
| 119 | self.header().state.timer_dequeue() | ||
| 120 | } | ||
| 121 | |||
| 122 | /// The returned pointer is valid for the entire TaskStorage. | 99 | /// The returned pointer is valid for the entire TaskStorage. |
| 123 | pub(crate) fn as_ptr(self) -> *const TaskHeader { | 100 | pub(crate) fn as_ptr(self) -> *const TaskHeader { |
| 124 | self.ptr.as_ptr() | 101 | self.ptr.as_ptr() |
diff --git a/embassy-executor/src/raw/timer_queue.rs b/embassy-executor/src/raw/timer_queue.rs index c4dba18ff..e52453be4 100644 --- a/embassy-executor/src/raw/timer_queue.rs +++ b/embassy-executor/src/raw/timer_queue.rs | |||
| @@ -71,14 +71,3 @@ impl TimerQueueItem { | |||
| 71 | } | 71 | } |
| 72 | } | 72 | } |
| 73 | } | 73 | } |
| 74 | |||
| 75 | /// The operation to perform after `timer_enqueue` is called. | ||
| 76 | #[derive(Debug, Copy, Clone, PartialEq)] | ||
| 77 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | ||
| 78 | #[must_use] | ||
| 79 | pub enum TimerEnqueueOperation { | ||
| 80 | /// Enqueue the task (or update its expiration time). | ||
| 81 | Enqueue, | ||
| 82 | /// The task must not be enqueued in the timer queue. | ||
| 83 | Ignore, | ||
| 84 | } | ||
