aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-08-23 14:30:10 +0200
committerGitHub <[email protected]>2022-08-23 14:30:10 +0200
commit6530c179b2efffa19fe5d7e336837692e0365af4 (patch)
treedc2818f85297fb43777d0f90fe8127ca6ffb2a51 /embassy-sync
parentcb9f0ef5b800ce4a22cde1805e0eb88425f1e07b (diff)
parentb6bc627b24e0ad3b2e8a45ddf9b34b32f5b2e780 (diff)
Merge pull request #923 from lulf/doc-warnings2
Fix warnings after crate split
Diffstat (limited to 'embassy-sync')
-rw-r--r--embassy-sync/README.md12
-rw-r--r--embassy-sync/src/lib.rs2
-rw-r--r--embassy-sync/src/signal.rs4
3 files changed, 15 insertions, 3 deletions
diff --git a/embassy-sync/README.md b/embassy-sync/README.md
new file mode 100644
index 000000000..106295c0d
--- /dev/null
+++ b/embassy-sync/README.md
@@ -0,0 +1,12 @@
1# embassy-sync
2
3Synchronization primitives and data structures with an async API:
4
5- [`Channel`](channel::Channel) - A Multiple Producer Multiple Consumer (MPMC) channel. Each message is only received by a single consumer.
6- [`PubSubChannel`](pubsub::PubSubChannel) - A broadcast channel (publish-subscribe) channel. Each message is received by all consumers.
7- [`Signal`](signal::Signal) - Signalling latest value to a single consumer.
8- [`Mutex`](mutex::Mutex) - A Mutex for synchronizing state between asynchronous tasks.
9- [`Pipe`](pipe::Pipe) - Byte stream implementing `embedded_io` traits.
10- [`WakerRegistration`](waitqueue::WakerRegistration) - Utility to register and wake a `Waker`.
11- [`AtomicWaker`](waitqueue::AtomicWaker) - A variant of `WakerRegistration` accessible using a non-mut API.
12- [`MultiWakerRegistration`](waitqueue::MultiWakerRegistration) - Utility registering and waking multiple `Waker`'s.
diff --git a/embassy-sync/src/lib.rs b/embassy-sync/src/lib.rs
index 8e81e5cbe..25150e8aa 100644
--- a/embassy-sync/src/lib.rs
+++ b/embassy-sync/src/lib.rs
@@ -1,7 +1,7 @@
1#![cfg_attr(not(any(feature = "std", feature = "wasm")), no_std)] 1#![cfg_attr(not(any(feature = "std", feature = "wasm")), no_std)]
2#![cfg_attr(feature = "nightly", feature(generic_associated_types, type_alias_impl_trait))] 2#![cfg_attr(feature = "nightly", feature(generic_associated_types, type_alias_impl_trait))]
3#![allow(clippy::new_without_default)] 3#![allow(clippy::new_without_default)]
4#![doc = include_str!("../../README.md")] 4#![doc = include_str!("../README.md")]
5#![warn(missing_docs)] 5#![warn(missing_docs)]
6 6
7// This mod MUST go first, so that the others see its macros. 7// This mod MUST go first, so that the others see its macros.
diff --git a/embassy-sync/src/signal.rs b/embassy-sync/src/signal.rs
index 3f665e388..f6ebeb9b9 100644
--- a/embassy-sync/src/signal.rs
+++ b/embassy-sync/src/signal.rs
@@ -6,7 +6,7 @@ use core::task::{Context, Poll, Waker};
6 6
7/// Single-slot signaling primitive. 7/// Single-slot signaling primitive.
8/// 8///
9/// This is similar to a [`Channel`](crate::channel::mpmc::Channel) with a buffer size of 1, except 9/// This is similar to a [`Channel`](crate::channel::Channel) with a buffer size of 1, except
10/// "sending" to it (calling [`Signal::signal`]) when full will overwrite the previous value instead 10/// "sending" to it (calling [`Signal::signal`]) when full will overwrite the previous value instead
11/// of waiting for the receiver to pop the previous value. 11/// of waiting for the receiver to pop the previous value.
12/// 12///
@@ -14,7 +14,7 @@ use core::task::{Context, Poll, Waker};
14/// the latest data, and therefore it's fine to "lose" messages. This is often the case for "state" 14/// the latest data, and therefore it's fine to "lose" messages. This is often the case for "state"
15/// updates. 15/// updates.
16/// 16///
17/// For more advanced use cases, you might want to use [`Channel`](crate::channel::mpmc::Channel) instead. 17/// For more advanced use cases, you might want to use [`Channel`](crate::channel::Channel) instead.
18/// 18///
19/// Signals are generally declared as `static`s and then borrowed as required. 19/// Signals are generally declared as `static`s and then borrowed as required.
20/// 20///