diff options
| author | James Munns <[email protected]> | 2025-07-03 09:11:32 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-11 14:45:06 +0200 |
| commit | cf171ad6d9c0a7487400beb9e4a436e5c1b64e19 (patch) | |
| tree | f6ebb50056557cae7d091585e8f414159e4ef9c6 /embassy-executor/src | |
| parent | db063945e76a9b62672377ed71e6e833a295a054 (diff) | |
fmt
Diffstat (limited to 'embassy-executor/src')
| -rw-r--r-- | embassy-executor/src/raw/run_queue.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/embassy-executor/src/raw/run_queue.rs b/embassy-executor/src/raw/run_queue.rs index 5fd703aad..b4b22819f 100644 --- a/embassy-executor/src/raw/run_queue.rs +++ b/embassy-executor/src/raw/run_queue.rs | |||
| @@ -151,12 +151,12 @@ fn run_dequeue(taskref: &TaskRef) { | |||
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | /// A wrapper type that acts like TransferStack by wrapping a normal Stack in a CS mutex | 153 | /// A wrapper type that acts like TransferStack by wrapping a normal Stack in a CS mutex |
| 154 | #[cfg(not(target_has_atomic="ptr"))] | 154 | #[cfg(not(target_has_atomic = "ptr"))] |
| 155 | struct MutexTransferStack<T: Linked<cordyceps::stack::Links<T>>> { | 155 | struct MutexTransferStack<T: Linked<cordyceps::stack::Links<T>>> { |
| 156 | inner: mutex::BlockingMutex<mutex::raw_impls::cs::CriticalSectionRawMutex, cordyceps::Stack<T>>, | 156 | inner: mutex::BlockingMutex<mutex::raw_impls::cs::CriticalSectionRawMutex, cordyceps::Stack<T>>, |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | #[cfg(not(target_has_atomic="ptr"))] | 159 | #[cfg(not(target_has_atomic = "ptr"))] |
| 160 | impl<T: Linked<cordyceps::stack::Links<T>>> MutexTransferStack<T> { | 160 | impl<T: Linked<cordyceps::stack::Links<T>>> MutexTransferStack<T> { |
| 161 | const fn new() -> Self { | 161 | const fn new() -> Self { |
| 162 | Self { | 162 | Self { |
| @@ -173,8 +173,6 @@ impl<T: Linked<cordyceps::stack::Links<T>>> MutexTransferStack<T> { | |||
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | fn take_all(&self) -> cordyceps::Stack<T> { | 175 | fn take_all(&self) -> cordyceps::Stack<T> { |
| 176 | self.inner.with_lock(|stack| { | 176 | self.inner.with_lock(|stack| stack.take_all()) |
| 177 | stack.take_all() | ||
| 178 | }) | ||
| 179 | } | 177 | } |
| 180 | } | 178 | } |
