aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src/raw/mod.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-12-09 00:28:14 +0100
committerDániel Buga <[email protected]>2024-12-15 18:49:57 +0100
commit2f2e2c6031a1abaecdac5ed2febe109e647fe6fd (patch)
tree57ecbf9d7c0ab5e9439f12aedeaa58d0156d1605 /embassy-executor/src/raw/mod.rs
parentb268b1795fed58544c166c41842ce0d66328aa3e (diff)
Make `integrated-timers` the default, remove Cargo feature.
Diffstat (limited to 'embassy-executor/src/raw/mod.rs')
-rw-r--r--embassy-executor/src/raw/mod.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs
index 14d689900..2feaab155 100644
--- a/embassy-executor/src/raw/mod.rs
+++ b/embassy-executor/src/raw/mod.rs
@@ -16,7 +16,6 @@ mod run_queue;
16#[cfg_attr(not(target_has_atomic = "8"), path = "state_critical_section.rs")] 16#[cfg_attr(not(target_has_atomic = "8"), path = "state_critical_section.rs")]
17mod state; 17mod state;
18 18
19#[cfg(feature = "integrated-timers")]
20pub mod timer_queue; 19pub mod timer_queue;
21#[cfg(feature = "trace")] 20#[cfg(feature = "trace")]
22mod trace; 21mod trace;
@@ -45,7 +44,6 @@ pub(crate) struct TaskHeader {
45 poll_fn: SyncUnsafeCell<Option<unsafe fn(TaskRef)>>, 44 poll_fn: SyncUnsafeCell<Option<unsafe fn(TaskRef)>>,
46 45
47 /// Integrated timer queue storage. This field should not be accessed outside of the timer queue. 46 /// Integrated timer queue storage. This field should not be accessed outside of the timer queue.
48 #[cfg(feature = "integrated-timers")]
49 pub(crate) timer_queue_item: timer_queue::TimerQueueItem, 47 pub(crate) timer_queue_item: timer_queue::TimerQueueItem,
50} 48}
51 49
@@ -87,13 +85,11 @@ impl TaskRef {
87 } 85 }
88 86
89 /// Returns a reference to the executor that the task is currently running on. 87 /// Returns a reference to the executor that the task is currently running on.
90 #[cfg(feature = "integrated-timers")]
91 pub unsafe fn executor(self) -> Option<&'static Executor> { 88 pub unsafe fn executor(self) -> Option<&'static Executor> {
92 self.header().executor.get().map(|e| Executor::wrap(e)) 89 self.header().executor.get().map(|e| Executor::wrap(e))
93 } 90 }
94 91
95 /// Returns a reference to the timer queue item. 92 /// Returns a reference to the timer queue item.
96 #[cfg(feature = "integrated-timers")]
97 pub fn timer_queue_item(&self) -> &'static timer_queue::TimerQueueItem { 93 pub fn timer_queue_item(&self) -> &'static timer_queue::TimerQueueItem {
98 &self.header().timer_queue_item 94 &self.header().timer_queue_item
99 } 95 }
@@ -106,7 +102,6 @@ impl TaskRef {
106 /// 102 ///
107 /// This functions should only be called by the timer queue implementation, before 103 /// This functions should only be called by the timer queue implementation, before
108 /// enqueueing the timer item. 104 /// enqueueing the timer item.
109 #[cfg(feature = "integrated-timers")]
110 pub unsafe fn timer_enqueue(&self) -> timer_queue::TimerEnqueueOperation { 105 pub unsafe fn timer_enqueue(&self) -> timer_queue::TimerEnqueueOperation {
111 self.header().state.timer_enqueue() 106 self.header().state.timer_enqueue()
112 } 107 }
@@ -117,7 +112,6 @@ impl TaskRef {
117 /// 112 ///
118 /// This functions should only be called by the timer queue implementation, after the task has 113 /// This functions should only be called by the timer queue implementation, after the task has
119 /// been removed from the timer queue. 114 /// been removed from the timer queue.
120 #[cfg(feature = "integrated-timers")]
121 pub unsafe fn timer_dequeue(&self) { 115 pub unsafe fn timer_dequeue(&self) {
122 self.header().state.timer_dequeue() 116 self.header().state.timer_dequeue()
123 } 117 }
@@ -162,7 +156,6 @@ impl<F: Future + 'static> TaskStorage<F> {
162 // Note: this is lazily initialized so that a static `TaskStorage` will go in `.bss` 156 // Note: this is lazily initialized so that a static `TaskStorage` will go in `.bss`
163 poll_fn: SyncUnsafeCell::new(None), 157 poll_fn: SyncUnsafeCell::new(None),
164 158
165 #[cfg(feature = "integrated-timers")]
166 timer_queue_item: timer_queue::TimerQueueItem::new(), 159 timer_queue_item: timer_queue::TimerQueueItem::new(),
167 }, 160 },
168 future: UninitCell::uninit(), 161 future: UninitCell::uninit(),