Provide Rust atomic helpers over raw pointers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 21 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | rust: sync: atomic: Remove bound `T: Sync` for `Atomci::from_ptr()`rust/ | +1 | 3 replies | |
| 2/2 | rust: sync: atomic: Add atomic operation helpers over raw pointersrust/ rust/ | +150 | 18 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Alice Ryhl | Gary Guo |
|---|---|---|
| 1/2 | R-b | R-b |
| 2/2 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] Provide Rust atomic helpers over raw pointers
[1] indicates that there might be need for Rust to synchronize with C over atomic, currently the recommendation is using Atomic::from_ptr().op(), however, it's more convenient to have helper wrapper that directly perform operation over pointers. Hence add them for load()/store()/xchg()/cmpxgh().
While working on this, I also found an issue in from_ptr(), therefore fix it.
[1]: https://lore.kernel.org/rust-for-linux/[email protected]/
Regards,
Boqun
Boqun Feng (2):
rust: sync: atomic: Remove bound T: Sync for Atomci::from_ptr()
rust: sync: atomic: Add atomic operation helpers over raw pointers
rust/kernel/sync/atomic.rs | 109 ++++++++++++++++++++++++++- rust/kernel/sync/atomic/predefine.rs | 46 +++++++++++ 2 files changed, 151 insertions(+), 4 deletions(-)
Signature · 1 line
2.51.0