linux-stable/rust
Filipe Xavier f4c2c90bb7 rust: lock: add trylock method support for lock backend
Add a non-blocking trylock method to lock backend interface, mutex and
spinlock implementations. It includes a C helper for spin_trylock.

Rust Binder will use this method together with the new shrinker
abstractions to avoid deadlocks in the memory shrinker.

Link: https://lore.kernel.org/all/20240912-shrinker-v1-1-18b7f1253553@google.com
Signed-off-by: Filipe Xavier <felipe_life@live.com>
Reviewed-by: Fiona Behrens <me@kloenk.dev>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/BL0PR02MB4914579914884B5D7473B3D6E96A2@BL0PR02MB4914.namprd02.prod.outlook.com
[ Slightly reworded. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-10-10 00:33:42 +02:00
..
bindings rust: enable clippy::undocumented_unsafe_blocks lint 2024-10-07 21:39:05 +02:00
helpers rust: lock: add trylock method support for lock backend 2024-10-10 00:33:42 +02:00
kernel rust: lock: add trylock method support for lock backend 2024-10-10 00:33:42 +02:00
macros Rust changes for v6.12 2024-09-25 10:25:40 -07:00
uapi rust: enable clippy::undocumented_unsafe_blocks lint 2024-10-07 21:39:05 +02:00
.gitignore rust: support running Rust documentation tests as KUnit ones 2023-07-19 09:32:53 -06:00
bindgen_parameters rust: fix ARCH_SLAB_MINALIGN multiple definition error 2024-09-26 17:52:35 +02:00
build_error.rs rust: add build_error crate 2022-12-04 01:59:16 +01:00
compiler_builtins.rs rust: add intrinsics to fix -Os builds 2024-08-10 00:05:10 +02:00
exports.c rust: kbuild: auto generate helper exports 2024-08-19 11:09:02 +02:00
Makefile rust: enable rustdoc::unescaped_backticks lint 2024-10-07 21:39:05 +02:00