rtic/rtic-macros/src
Oleksandr Babak a03ac2c4c9 fix: make mutexes !Send
Each mutex is generated uniquely for each task, it is unsound to send
them between tasks. But they are `Send`. Before, it wasn't an issue,
because you couldn't share non-`'static` data between them, but with
\#1043 you can make the mutex `'static`. Thus we need to use actual
tools that Rust provides and out out from `Send`.

Currently, mutexes are simple ZSTs with `PhantomData<&'a ()>`, which is `Send`.
We replace it with `PhantomData<(&'a (), *const u8)>`, and return `Sync`
back via `unsafe` implementation. It is trivially sound, because mutexes have
no method methods that accept `&self`.

See https://doc.rust-lang.org/std/sync/struct.Exclusive.html for details.
2025-12-03 19:57:58 +00:00
..
codegen fix: make mutexes !Send 2025-12-03 19:57:58 +00:00
syntax rtic-macros: forward attributes applied to app module 2025-09-17 19:40:38 +02:00
analyze.rs
check.rs
codegen.rs rtic-macros: forward attributes applied to app module 2025-09-17 19:40:38 +02:00
lib.rs
preprocess.rs
syntax.rs