diff options
Diffstat (limited to 'embassy-executor/src/raw/state_atomics.rs')
| -rw-r--r-- | embassy-executor/src/raw/state_atomics.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/embassy-executor/src/raw/state_atomics.rs b/embassy-executor/src/raw/state_atomics.rs index d03c61ade..15eb9a368 100644 --- a/embassy-executor/src/raw/state_atomics.rs +++ b/embassy-executor/src/raw/state_atomics.rs | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | use core::sync::atomic::{AtomicU32, Ordering}; | 1 | use core::sync::atomic::{AtomicU32, Ordering}; |
| 2 | 2 | ||
| 3 | #[cfg(feature = "integrated-timers")] | ||
| 4 | use super::timer_queue::TimerEnqueueOperation; | 3 | use super::timer_queue::TimerEnqueueOperation; |
| 5 | 4 | ||
| 6 | /// Task is spawned (has a future) | 5 | /// Task is spawned (has a future) |
| @@ -8,7 +7,6 @@ pub(crate) const STATE_SPAWNED: u32 = 1 << 0; | |||
| 8 | /// Task is in the executor run queue | 7 | /// Task is in the executor run queue |
| 9 | pub(crate) const STATE_RUN_QUEUED: u32 = 1 << 1; | 8 | pub(crate) const STATE_RUN_QUEUED: u32 = 1 << 1; |
| 10 | /// Task is in the executor timer queue | 9 | /// Task is in the executor timer queue |
| 11 | #[cfg(feature = "integrated-timers")] | ||
| 12 | pub(crate) const STATE_TIMER_QUEUED: u32 = 1 << 2; | 10 | pub(crate) const STATE_TIMER_QUEUED: u32 = 1 << 2; |
| 13 | 11 | ||
| 14 | pub(crate) struct State { | 12 | pub(crate) struct State { |
| @@ -60,7 +58,6 @@ impl State { | |||
| 60 | } | 58 | } |
| 61 | 59 | ||
| 62 | /// Mark the task as timer-queued. Return whether it can be enqueued. | 60 | /// Mark the task as timer-queued. Return whether it can be enqueued. |
| 63 | #[cfg(feature = "integrated-timers")] | ||
| 64 | #[inline(always)] | 61 | #[inline(always)] |
| 65 | pub fn timer_enqueue(&self) -> TimerEnqueueOperation { | 62 | pub fn timer_enqueue(&self) -> TimerEnqueueOperation { |
| 66 | if self | 63 | if self |
| @@ -83,7 +80,6 @@ impl State { | |||
| 83 | } | 80 | } |
| 84 | 81 | ||
| 85 | /// Unmark the task as timer-queued. | 82 | /// Unmark the task as timer-queued. |
| 86 | #[cfg(feature = "integrated-timers")] | ||
| 87 | #[inline(always)] | 83 | #[inline(always)] |
| 88 | pub fn timer_dequeue(&self) { | 84 | pub fn timer_dequeue(&self) { |
| 89 | self.state.fetch_and(!STATE_TIMER_QUEUED, Ordering::Relaxed); | 85 | self.state.fetch_and(!STATE_TIMER_QUEUED, Ordering::Relaxed); |
