Remove special handling of integrated timer items

This commit is contained in:
Dániel Buga
2024-12-16 18:56:42 +01:00
parent c9f32b7e36
commit fbd0fe06bd
3 changed files with 0 additions and 35 deletions

View File

@@ -96,29 +96,6 @@ impl TaskRef {
&self.header().timer_queue_item
}
/// Mark the task as timer-queued. Return whether it should be actually enqueued
/// using `_embassy_time_schedule_wake`.
///
/// Entering this state prevents the task from being respawned while in a timer queue.
///
/// Safety:
///
/// This functions should only be called by the timer queue driver, before
/// enqueueing the timer item.
pub unsafe fn timer_enqueue(&self) -> timer_queue::TimerEnqueueOperation {
self.header().state.timer_enqueue()
}
/// Unmark the task as timer-queued.
///
/// Safety:
///
/// This functions should only be called by the timer queue implementation, after the task has
/// been removed from the timer queue.
pub unsafe fn timer_dequeue(&self) {
self.header().state.timer_dequeue()
}
/// The returned pointer is valid for the entire TaskStorage.
pub(crate) fn as_ptr(self) -> *const TaskHeader {
self.ptr.as_ptr()

View File

@@ -71,14 +71,3 @@ impl TimerQueueItem {
}
}
}
/// The operation to perform after `timer_enqueue` is called.
#[derive(Debug, Copy, Clone, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[must_use]
pub enum TimerEnqueueOperation {
/// Enqueue the task (or update its expiration time).
Enqueue,
/// The task must not be enqueued in the timer queue.
Ignore,
}