Commit graph

1229 commits

Author SHA1 Message Date
Jorge Iglesias Garcia
eec2e9c154
Revert CI changes 2021-08-27 12:00:33 +08:00
Jorge Iglesias Garcia
58c2b6c829
Update README.md 2021-08-27 11:55:20 +08:00
Jorge Iglesias Garcia
2457af1612
Update README.md 2021-08-27 11:24:30 +08:00
Jorge Iglesias Garcia
77427f962d
Merge branch 'rtic-rs:master' into master 2021-08-27 11:16:51 +08:00
Alex Martens
81a7722ab6 Fix link for SLEEPONEXIT 2021-08-26 14:29:18 -07:00
bors[bot]
22ec841ee1
Merge #516
516: More rustanalyzer lint fixes r=korken89 a=korken89

Found some more

Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2021-08-20 07:27:07 +00:00
Emil Fresk
52dc324aa7 More rustanalyzer lint fixes 2021-08-20 09:21:02 +02:00
bors[bot]
f77b81e0ee
Merge #515
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>
2021-08-20 06:50:43 +00:00
datdenkikniet
cdbd8a2ced Use mark_internal_name by default for methods in util to make usage of these functions more straightforward.
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
2021-08-20 08:12:13 +02:00
bors[bot]
3bf5a4f7a0
Merge #514
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>
2021-08-19 11:09:47 +00:00
Henrik Tjäder
018e4a121f Silence rust-analyzer warnings on internal types 2021-08-19 13:02:17 +02:00
bors[bot]
2f180c0e3f
Merge #513
513: Fixed some lints from Rust Analyzer with experimental proc-macros r=AfoHT a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2021-08-19 07:57:20 +00:00
Emil Fresk
13f7516a4d Fixed some lints from Rust Analyzer with experimental proc-macros 2021-08-19 09:49:00 +02:00
bors[bot]
6b9966678c
Merge #511
511: Remove linked list impl - use heapless, linked list init now const fn r=AfoHT a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2021-08-17 12:21:20 +00:00
Emil Fresk
bc3eb5c547 Remove linked list impl - use heapless, linked list init now const fn 2021-08-16 15:38:31 +02:00
bors[bot]
74b3964978
Merge #508
508: update russian book r=AfoHT a=burrbull



Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
2021-08-16 11:41:49 +00:00
Jorgeig
a4b6fb3404 Add branches to CI 2021-08-11 11:28:23 +08:00
Jorgeig
c5585271e6 Add branches to CI 2021-08-11 11:27:27 +08:00
Jorge Iglesias Garcia
50ff1bfae4
Update build.yml
Add a "test" branch
2021-08-11 00:50:37 +08:00
Andrey Zgarbul
9134f7d36a update russian book 2021-08-03 22:40:33 +03:00
bors[bot]
8ddfcf8efc
Merge #504
504: Add links to RTIC book dev version and rtic-examples r=japaric a=AfoHT



Co-authored-by: Henrik Tjäder <henrik@grepit.se>
2021-08-03 15:32:52 +00:00
bors[bot]
6674848111
Merge #506
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>
2021-08-02 14:56:06 +00:00
bors[bot]
c867f5ff9a
Merge #507
507: GHA: Fix 1.54 formatting change r=korken89 a=AfoHT



Co-authored-by: Henrik Tjäder <henrik@grepit.se>
2021-08-02 14:24:52 +00:00
Henrik Tjäder
fe1de5cbf7 GHA: Fix 1.54 formatting change 2021-08-02 14:56:15 +02:00
CuriouslyCurious
f6f61f95a6 book: Properly update the note with a link 2021-07-30 12:44:35 +02:00
CuriouslyCurious
ae7b444f3d Revert "book: Add link to new.md"
This reverts commit 7a977f3fa9.
2021-07-30 12:43:35 +02:00
CuriouslyCurious
7a977f3fa9 book: Add link to new.md 2021-07-29 13:58:21 +02:00
CuriouslyCurious
e90e6332f6 book: Clarify target notice 2021-07-29 00:29:34 +02:00
CuriouslyCurious
007665eeee book: Add note to remember to choose target 2021-07-28 13:55:12 +02:00
Henrik Tjäder
5477ae288f Also link to rtic-examples in the tips section of the book 2021-07-27 20:04:56 +02:00
Henrik Tjäder
1e2fb2eeb2 Add links to RTIC book dev version and rtic-examples 2021-07-27 19:41:15 +02:00
bors[bot]
49d4185e3b
Merge #501
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>
2021-07-22 10:57:49 +00:00
bors[bot]
adb4bc4c4e
Merge #502
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>
2021-07-22 10:51:16 +00:00
bors[bot]
b6e8e37c3c
Merge #500
500: migration/0.5: cover #[lock_free] r=AfoHT a=japaric

I think this completes #488

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2021-07-22 10:45:46 +00:00
Jorge Aparicio
3eac8b91cf book/resources: highlight that #[lock_free] includes a compile-time check
for the "same priority requirement"; this prevents data races
2021-07-22 10:35:09 +02:00
Alex Crawford
5f395658f0 Propogate the task attributes to the spawn handles
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`
```
2021-07-22 01:00:57 -07:00
bors[bot]
c62fd967d7
Merge #498
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>
2021-07-22 07:29:35 +00:00
Jorge Aparicio
a7ed040799 migration/0.5: cover #[lock_free]
I think this completes #488
2021-07-22 09:27:42 +02:00
Jorge Aparicio
5805a05fac book/resources: rm #[task_local] mention; add #[lock_free] example
the #[task_local] attribute was removed
2021-07-22 09:17:39 +02:00
Jorge Aparicio
f9a7efb235 update expected example output (take 2) 2021-07-22 08:58:17 +02:00
Jorge Aparicio
af631719f4 update expected example output 2021-07-22 08:42:44 +02:00
Jorge Aparicio
ae1f9008a4 comment out line that doesn't compile 2021-07-22 08:28:11 +02:00
Jorge Aparicio
cd4e8183f6 book/resources: remove mentions of the field attribute #[init(<expr>)]
it no longer exists. all resources are now late resources
2021-07-21 15:59:08 +02:00
Jorge Aparicio
6bf1c76d84 book/resources: do not use the lock API in the very first example
instead stick to `#[local]` resources
2021-07-21 15:55:14 +02:00
bors[bot]
2f3b5cba80
Merge #496
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>
2021-07-21 08:40:21 +00:00
Jorge Aparicio
18880406cb use tuple struct syntax for Monotonics everywhere 2021-07-21 10:14:00 +02:00
Jorge Aparicio
5f7dc0b903 update the 0.5.x -> 0.6.0 migration guide
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
2021-07-21 10:11:43 +02:00
bors[bot]
29aef36f67
Merge #497
497: Change misleading documentation left over by PR #464 r=AfoHT a=Cat-Ion



Co-authored-by: Valentin Ochs <a@0au.de>
2021-07-20 14:14:47 +00:00
Valentin Ochs
c4c964de7b Change misleading documentation left over by PR #464 2021-07-20 14:37:13 +02:00
bors[bot]
78f556f942
Merge #464
464: const generics r=AfoHT a=burrbull



Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
Co-authored-by: mriise <mark.riise26@gmail.com>
Co-authored-by: Zgarbul Andrey <zgarbul.andrey@gmail.com>
2021-07-20 08:51:53 +00:00