linux/rust/helpers
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
..
blk.c
bug.c
build_assert.c
build_bug.c
err.c
helpers.c rust: rbtree: add red-black tree implementation backed by the C version 2024-08-31 17:35:08 +02:00
kunit.c
mutex.c rust: mutex: fix __mutex_init() usage in case of PREEMPT_RT 2024-09-26 21:22:15 +02:00
page.c
rbtree.c rust: rbtree: add red-black tree implementation backed by the C version 2024-08-31 17:35:08 +02:00
refcount.c
signal.c
slab.c
spinlock.c rust: lock: add trylock method support for lock backend 2024-10-10 00:33:42 +02:00
task.c
uaccess.c
wait.c
workqueue.c