From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: rust: maple_tree: implement Send and Sync for MapleTree Date: Tue, 28 Apr 2026 15:32:04 +1000 Message-ID: In-Reply-To: <20260425211454.174696-23-joelagnelf@nvidia.com> References: <20260425211454.174696-1-joelagnelf@nvidia.com> <20260425211454.174696-23-joelagnelf@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Adds manual `Send`/`Sync` impls for `MapleTree` (where `T: ForeignOwnabl= e + Send`) and makes `MapleGuard` `!Send` via `NotThreadSafe`. **The `Sync` safety argument deserves scrutiny:** The comment says `&MapleT= ree` never hands out `&T` =E2=80=94 all access goes through `ma_lock` vi= a `MapleGuard`. This appears correct: `lock()` returns a `MapleGuard` requi= ring `&mut` for value access. The `T: Send` (not `T: Sync`) bound for the `= Sync` impl is the right choice since values are effectively "moved" under t= he lock. **This modifies shared kernel Rust infrastructure** (`rust/kernel/maple_tre= e.rs`), not just nova-core. It should get explicit review from Rust-for-Lin= ux maintainers (who are CC'd). The `NotThreadSafe` marker on `MapleGuard` is correct =E2=80=94 spinlocks m= ust be released on the same CPU that acquired them. --- Generated by Claude Code Patch Reviewer