aboutsummaryrefslogtreecommitdiff
path: root/book/en
diff options
context:
space:
mode:
authordatdenkikniet <jcdra1@gmail.com>2023-04-22 18:25:00 +0200
committerdatdenkikniet <jcdra1@gmail.com>2023-05-11 19:20:58 +0200
commitd90fa95266bc9864d2dec0248fa4bae5c7e5b6ec (patch)
treefae20e927b0d9d5f1b13921d65699d3dde72e053 /book/en
parent1dc2f80eb6cb6ac6d1eaede4169d8cabc51c5e7c (diff)
Add some more
Diffstat (limited to 'book/en')
-rw-r--r--book/en/src/migration/migration_v2.md6
-rw-r--r--book/en/src/migration/migration_v2/monotonics.md2
-rw-r--r--book/en/src/migration/migration_v2/rtic-sync.md10
3 files changed, 14 insertions, 4 deletions
diff --git a/book/en/src/migration/migration_v2.md b/book/en/src/migration/migration_v2.md
index 071d34c..96fa231 100644
--- a/book/en/src/migration/migration_v2.md
+++ b/book/en/src/migration/migration_v2.md
@@ -5,11 +5,13 @@ Migrating a project from RTIC `v1.0.x` to `v2.0.0` involves the following steps:
1. `v2.0.0` requires [`#![type_alias_impl_trait]`](https://github.com/rust-lang/rust/issues/63063) and Rust Nightly.
2. Migrating from the monotonics included in `v1.0.x` to `rtic-time` and `rtic-monotonics`, replacing `spawn_after`, `spawn_at`.
3. Software tasks are now required to be `async`, and using them correctly.
-4. Understanding and using data types provided by `rtic-sync` to solve migration problems.
+4. Understanding and using data types provided by `rtic-sync`.
+
+For a detailed description of the changes, refer to the subchapters.
If you wish to see a code example of changes required, you can check out [the full example migration page](./migration_v2/complete_example.md).
-## TL;DR
+#### TL;DR (Too Long; Didn't Read)
1. Add `#![type_alias_impl_trait]` to your crate, and use `cargo +nightly`.
2. Instead of `spawn_after` and `spawn_at`, you now use the `async` functions `delay`, `delay_until` (and related) with impls provided by `rtic-monotonics`.
3. Software tasks _must_ be `async fn`s now. Not returning from a task is allowed so long as there is an `await` in the task. You can still `lock` shared resources.
diff --git a/book/en/src/migration/migration_v2/monotonics.md b/book/en/src/migration/migration_v2/monotonics.md
index f794bec..7427408 100644
--- a/book/en/src/migration/migration_v2/monotonics.md
+++ b/book/en/src/migration/migration_v2/monotonics.md
@@ -8,4 +8,4 @@ The `#[monotonic]` attribute is no longer used. Instead, you use a `create_X_tok
Check out the [code example](./complete_example.md) for an overview of the required changes.
-For more information on current monotonic implementations, see [the `rtic-monotonics` documentation](https://docs.rs/rtic-monotonics). \ No newline at end of file
+For more information on current monotonic implementations, see [the `rtic-monotonics` documentation](https://docs.rs/rtic-monotonics), and [the examples](https://github.com/rtic-rs/rtic/tree/master/examples). \ No newline at end of file
diff --git a/book/en/src/migration/migration_v2/rtic-sync.md b/book/en/src/migration/migration_v2/rtic-sync.md
index d086d5d..fefde03 100644
--- a/book/en/src/migration/migration_v2/rtic-sync.md
+++ b/book/en/src/migration/migration_v2/rtic-sync.md
@@ -1 +1,9 @@
-# Using `rtic-sync` \ No newline at end of file
+# Using `rtic-sync`
+
+`rtic-sync` provides primitives that can be used for message passing and resource sharing in async context.
+
+The important structs are:
+* The `Arbiter`, which allows you to await access to a shared resource in async contexts without using `lock`.
+* `Channel`, which allows you to communicate between tasks (both `async` and non-`async`).
+
+For more information on these structs, see the [`rtic-sync` docs](https://docs.rs/rtic-sync) \ No newline at end of file