[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D8LFWBYIFHSP.ZR8DMPGGM9SE@proton.me>
Date: Thu, 20 Mar 2025 22:17:10 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Alice Ryhl <aliceryhl@...gle.com>, Danilo Krummrich <dakr@...nel.org>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] rust: alloc: add Vec::push_within_capacity
On Thu Mar 20, 2025 at 2:52 PM CET, Alice Ryhl wrote:
> This introduces a new method called `push_within_capacity` for appending
> to a vector without attempting to allocate if the capacity is full. Rust
> Binder will use this in various places to safely push to a vector while
> holding a spinlock.
>
> The existing Vec::push method is reimplemented in terms of the new
> method.
>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
Reviewed-by: Benno Lossin <benno.lossin@...ton.me>
---
Cheers,
Benno
> ---
> rust/kernel/alloc/kvec.rs | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
Powered by blists - more mailing lists