515: `mark_internal_ident` cleanup r=korken89 a=datdenkikniet
Refactor so that all `idents` that had to call `mark_ident_internal` before now call `mark_name_internal` in the `util` module by default.
The commits can (and probably should) be squashed, they're separated for clarity.
Fixes#512
Co-authored-by: datdenkikniet <jcdra1@gmail.com>
fq_ident is always internal
rq_ident is always internal
monotonic_ident is always internal
inputs_ident is always internal
local_resources_ident is always internal
shared_resources_ident is always internal
monotonic_instants_ident is always internal
tq_ident is always internal
timer_queue_marker_ident is always internal
static_shared_resource_ident is always internal
static_local_resource_ident is always internal
declared_static_local_resource_ident is always internal
Only names, not idents, are now marked as internal
Use same rtic internal everywhere
514: Silence rust-analyzer warnings on internal types r=korken89 a=AfoHT
Continues the work started in #513
Co-authored-by: Henrik Tjäder <henrik@grepit.se>
506: book: Add note to remember to choose target r=AfoHT a=CuriouslyCurious
While following the instructions in the book I ran into a wall. I was getting linker errors and had no idea why. Turns out trying to run `cargo build --example init` on an x86 build target maybe doesn't work too well, so I added a note about it. 😅
I'll leave this as a draft since my Russian isn't fluent enough to add the note there as well. Also, adding a modified version of `.config/cargo.toml` from the embedded example might be a decent idea but wanted to hear from you guys first. :P
Co-authored-by: CuriouslyCurious <thecuriouslycurious@protonmail.com>
501: Propogate the task attributes to the spawn handles r=AfoHT a=crawford
This allows tasks to be gated by `cfg` attributes when also using
monotonics. For example:
```rust
#[cfg(feature = "logging")]
#[task(shared = [logger])]
fn logger_init(mut cx: logger_init::Context) {
/* ... */
}
```
Without this change, the reschedule_at() implementation is
unconditionally included even though it references the SpawnHandle from
its task module, which is _conditionally_ included. This resulted in
compiler errors like the following:
```
error[E0433]: failed to resolve: use of undeclared crate or module `logger_init`
--> src/main.rs:243:8
|
243 | fn logger_init(mut cx: logger_init::Context) {
| ^^^^^^^^^^^ use of undeclared crate or module `logger_init`
```
Co-authored-by: Alex Crawford <rtic@code.acrawford.com>
502: book/resources: highlight that `#[lock_free]` includes a compile-time check r=AfoHT a=japaric
for the "same priority requirement"; this prevents data races
Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
This allows tasks to be gated by `cfg` attributes when also using
monotonics. For example:
```rust
#[cfg(feature = "logging")]
#[task(shared = [logger])]
fn logger_init(mut cx: logger_init::Context) {
/* ... */
}
```
Without this change, the reschedule_at() implementation is
unconditionally included even though it references the SpawnHandle from
its task module, which is _conditionally_ included. This resulted in
compiler errors like the following:
```
error[E0433]: failed to resolve: use of undeclared crate or module `logger_init`
--> src/main.rs:243:8
|
243 | fn logger_init(mut cx: logger_init::Context) {
| ^^^^^^^^^^^ use of undeclared crate or module `logger_init`
```
498: book: update the resources chapter r=AfoHT a=japaric
see individual commit messages for details.
what's still left to do is adjust the very last section about `#[task_local]` and `#[lock_free]` but I plan to do that as a follow up. I didn't find an in-tree example for those two attributes (are they field attributes? where do they fit in the syntax?); a quick scan of the rtic-syntax crate seems to indicate that `task_local` has been removed (?) and that `lock_free` still exists.
Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
496: update the 0.5.x -> 0.6.0 migration guide r=AfoHT a=japaric
to use the new resources syntax
I also reordered the sections to cover all the resource API first before covering the spawn API
I've also added a section about the old `static mut` variable transform
Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
to use the new resources syntax
I also reordered the sections to cover all the resource API first before covering the spawn API
I've also added a section about the old `static mut` variable transform