Files
linux/rust/kernel
Alice Ryhl f523d110a6 rust: id_pool: do not immediately acquire new ids
When Rust Binder assigns a new ID, it performs various fallible
operations before it "commits" to actually using the new ID. To support
this pattern, change acquire_next_id() so that it does not immediately
call set_bit(), but instead returns an object that may be used to call
set_bit() later.

The UnusedId type holds a exclusive reference to the IdPool, so it's
guaranteed that nobody else can call find_unused_id() while the UnusedId
object is live.

[Miguel: rust: id_pool: fix example]

Reviewed-by: Burak Emir <bqe@google.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
2025-12-02 14:17:09 -05:00
..
2025-08-21 21:09:48 +02:00
2025-07-23 02:05:58 +02:00
2025-07-23 02:05:58 +02:00
2025-10-17 00:56:20 +02:00
2025-08-13 17:40:28 +02:00
2025-07-21 01:16:35 +02:00
2025-09-06 13:27:20 +02:00
2025-08-21 21:09:48 +02:00
2025-07-21 01:16:35 +02:00
2025-08-21 16:58:07 +02:00
2025-09-22 23:55:41 +02:00
2025-09-15 09:38:35 +02:00
2024-11-04 16:21:44 -05:00