Thread (3 messages) 3 messages, 2 authors, 2026-09-08

Re: [PATCH] rust: maple_tree: implement Send and Sync for MapleTree

flat view

From: Alice Ryhl <aliceryhl@google.com>
Date: 2026-09-08 08:49:40
Also in: lkml, rust-for-linux

On Tue, Sep 8, 2026 at 9:51 AM Eliot Courtney [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+// SAFETY: `&MapleTree<T>` never hands out `&T`; all entry access is serialized
+// by `ma_lock` or `&mut Guard`, so `T: Send` suffices (`T: Sync` not required).
+unsafe impl<T: ForeignOwnable + Send> Sync for MapleTree<T> {}
This is true now, but will change if load_rcu() from
https://lore.kernel.org/all/20260116-rcu-box-v1-2-38ebfbcd53f0@google.com/ (local)
got merged.

It might be better to just pre-emptively require T: Sync now?

Alice
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help