diff options
| author | diondokter <[email protected]> | 2025-05-01 09:44:39 +0200 |
|---|---|---|
| committer | diondokter <[email protected]> | 2025-05-01 09:44:39 +0200 |
| commit | f713f170a1a38a3eaa48ac535b211370f71d39aa (patch) | |
| tree | 1a696bd6ecc94b363f59fccb3612409cb89a0180 /embassy-sync/src/waitqueue/atomic_waker.rs | |
| parent | ae59d0acf4f7c7be028b1246aaa8033015985154 (diff) | |
| parent | 52e4c7c30c5f59d10afbef2447b96da68f4be0bc (diff) | |
Merge branch 'main' into configurable-bank-support
Diffstat (limited to 'embassy-sync/src/waitqueue/atomic_waker.rs')
| -rw-r--r-- | embassy-sync/src/waitqueue/atomic_waker.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/embassy-sync/src/waitqueue/atomic_waker.rs b/embassy-sync/src/waitqueue/atomic_waker.rs index 231902c5a..5a9910e7f 100644 --- a/embassy-sync/src/waitqueue/atomic_waker.rs +++ b/embassy-sync/src/waitqueue/atomic_waker.rs | |||
| @@ -5,6 +5,9 @@ use crate::blocking_mutex::raw::{CriticalSectionRawMutex, RawMutex}; | |||
| 5 | use crate::blocking_mutex::Mutex; | 5 | use crate::blocking_mutex::Mutex; |
| 6 | 6 | ||
| 7 | /// Utility struct to register and wake a waker. | 7 | /// Utility struct to register and wake a waker. |
| 8 | /// If a waker is registered, registering another waker will replace the previous one without waking it. | ||
| 9 | /// Intended to wake a task from an interrupt. Therefore, it is generally not expected, | ||
| 10 | /// that multiple tasks register try to register a waker simultaneously. | ||
| 8 | pub struct GenericAtomicWaker<M: RawMutex> { | 11 | pub struct GenericAtomicWaker<M: RawMutex> { |
| 9 | waker: Mutex<M, Cell<Option<Waker>>>, | 12 | waker: Mutex<M, Cell<Option<Waker>>>, |
| 10 | } | 13 | } |
