Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Update thread safety markers
@ 2023-05-23 14:44 Alice Ryhl
  2023-05-23 14:44 ` [PATCH v2 1/4] rust: sync: reword the `Arc` safety comment for `Send` Alice Ryhl
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Alice Ryhl @ 2023-05-23 14:44 UTC (permalink / raw)
  To: Miguel Ojeda, Wedson Almeida Filho, Alex Gaynor
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Alice Ryhl, Ingo Molnar, Peter Zijlstra, Will Deacon,
	Mark Rutland, rust-for-linux, linux-kernel, patches

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].

[1]: https://stackoverflow.com/a/68708557/1704411

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
-- 
2.40.1.698.g37aff9b760-goog


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-05-25 13:47 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-23 14:44 [PATCH v2 0/4] Update thread safety markers Alice Ryhl
2023-05-23 14:44 ` [PATCH v2 1/4] rust: sync: reword the `Arc` safety comment for `Send` Alice Ryhl
2023-05-23 15:49   ` Gary Guo
2023-05-23 16:27   ` Martin Rodriguez Reboredo
2023-05-25 13:35   ` Benno Lossin
2023-05-23 14:44 ` [PATCH v2 2/4] rust: sync: reword the `Arc` safety comment for `Sync` Alice Ryhl
2023-05-23 15:50   ` Gary Guo
2023-05-23 17:08     ` Alice Ryhl
2023-05-23 16:29   ` Martin Rodriguez Reboredo
2023-05-25 13:43   ` Benno Lossin
2023-05-23 14:44 ` [PATCH v2 3/4] rust: specify when `ARef` is thread safe Alice Ryhl
2023-05-23 16:31   ` Martin Rodriguez Reboredo
2023-05-25 13:45     ` Benno Lossin
2023-05-23 14:44 ` [PATCH v2 4/4] rust: task: add `Send` marker to `Task` Alice Ryhl
2023-05-23 15:56   ` Gary Guo
2023-05-23 16:41   ` Martin Rodriguez Reboredo
2023-05-25 13:46   ` Benno Lossin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox