aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync/src/waitqueue/atomic_waker.rs
diff options
context:
space:
mode:
authorckrenslehner <[email protected]>2025-04-26 20:07:30 +0200
committerckrenslehner <[email protected]>2025-04-26 20:11:25 +0200
commitc2173591aa77ab7aa0a1b3d921883667fb9881f4 (patch)
tree558b2c0a6dad1df3f6a570f4167e9e88cc7caaa0 /embassy-sync/src/waitqueue/atomic_waker.rs
parent572e788b2e878436bde527ad66cf561775cebc66 (diff)
docs: extend the waker documentation
Diffstat (limited to 'embassy-sync/src/waitqueue/atomic_waker.rs')
-rw-r--r--embassy-sync/src/waitqueue/atomic_waker.rs3
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};
5use crate::blocking_mutex::Mutex; 5use 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.
8pub struct GenericAtomicWaker<M: RawMutex> { 11pub struct GenericAtomicWaker<M: RawMutex> {
9 waker: Mutex<M, Cell<Option<Waker>>>, 12 waker: Mutex<M, Cell<Option<Waker>>>,
10} 13}