Skip to content

rust: atomic: add `fetch_sub` and update docs

Andreas Hindborg lkml rust-for-linux 3 versions – In review

Get series with b4
b4 am [email protected] change-id 20260128-atomic-sub-2ff15962df12

Versions newest first

  1. v3 Latest3 patches 6 repliesIn review
  2. v22 patches 4 repliesSuperseded
  3. v11 patch 3 repliesSuperseded

Changes in v3 from the cover letter

- Remove a spurious line feed.
- Add a patch to update a safety comment for fetch_add.
- Update safety comment in fetch_sub implementation.
- Link to v2: https://msgid.link/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rust: atomic: add fetch_subrust/kernel/sync/atomic.rs rust/kernel/sync/atomic/internal.rs+48 -00 replies
2/3rust: atomic: update documentation for `fetch_add`rust/kernel/sync/atomic.rs+4 -60 replies
3/3rust: atomic: update a safety comment in impl of `fetch_add`rust/kernel/sync/atomic/internal.rs+1 -13 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAlice Ryhl
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] rust: atomic: add `fetch_sub` and update docs

Add fetch_sub and improve documentation and safety comments of of fetch_add.

---
Changes in v3:
- Remove a spurious line feed.
- Add a patch to update a safety comment for fetch_add.
- Update safety comment in fetch_sub implementation.
- Link to v2: https://msgid.link/[email protected]

Changes in v2:
- Update example to be more clear.
- Add a patch that updates documentation for fetch_add.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Andreas Hindborg (3):
rust: atomic: add fetch_sub
rust: atomic: update documentation for fetch_add
rust: atomic: update a safety comment in impl of fetch_add

 rust/kernel/sync/atomic.rs          | 53 ++++++++++++++++++++++++++++++++-----
 rust/kernel/sync/atomic/internal.rs |  7 ++++-
 2 files changed, 53 insertions(+), 7 deletions(-)

---
base-commit: 63804fed149a6750ffd28610c5c1c98cce6bd377
change-id: 20260128-atomic-sub-2ff15962df12

Best regards,

Signature · 1 line
Andreas Hindborg <[email protected]>