Skip to content

Update thread safety markers

Alice Ryhl linux-patches lkml rust-for-linux 2 versions – Applied

Status from this message: Applied to `rust-next` -- thanks everyone (and Alice for taking the

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyApplied
  2. v24 patches 12 repliesSuperseded

Changes in v3 from the cover letter

* Removed "for example" as suggested in [2].
* Added Reviewed-by annotations from v2 review.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4rust: sync: reword the `Arc` safety comment for `Send`rust/kernel/sync/arc.rs+2 -20 replies
2/4rust: sync: reword the `Arc` safety comment for `Sync`rust/kernel/sync/arc.rs+5 -30 replies
3/4rust: specify when `ARef` is thread saferust/kernel/types.rs+13 -00 replies
4/4rust: task: add `Send` marker to `Task`rust/kernel/task.rs+8 -20 replies

Reviews trailers per patch

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

PatchAndreas HindborgBoqun FengGary GuoMartin Rodriguez ReboredoBenno Lossin
1/4R-b R-b R-b R-b R-b
2/4R-b R-b R-b R-b
3/4R-b R-b R-b R-b
4/4R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/4] Update thread safety markers

In Rust, the Send and Sync traits are used to mark in what ways a specific type is thread safe. In this patch series, I add some missing thread safety markers and improve the documentation related to them. This change will let you compile some code that would currently fail to compile even though it doesn't actually violate any thread safety rules.

You can find a definition of what these marker traits mean at [1].

Changes since v2:

* Removed "for example" as suggested in [2].
* Added Reviewed-by annotations from v2 review.

[1]: https://stackoverflow.com/a/68708557/1704411
[2]: https://lore.kernel.org/all/[email protected]/

Alice Ryhl (4):
rust: sync: reword the Arc safety comment for Send
rust: sync: reword the Arc safety comment for Sync
rust: specify when ARef is thread safe
rust: task: add Send marker to Task

 rust/kernel/sync/arc.rs | 12 +++++++-----
 rust/kernel/task.rs     | 10 ++++++++--
 rust/kernel/types.rs    | 13 +++++++++++++
 3 files changed, 28 insertions(+), 7 deletions(-)

base-commit: ac9a78681b921877518763ba0e89202254349d1b

Signature · 1 line
2.41.0.rc0.172.g3f132b7071-goog