linux/rust/helpers
Danilo Krummrich 76c01ded72 rust: add devres abstraction
Add a Rust abstraction for the kernel's devres (device resource
management) implementation.

The Devres type acts as a container to manage the lifetime and
accessibility of device bound resources. Therefore it registers a
devres callback and revokes access to the resource on invocation.

Users of the Devres abstraction can simply free the corresponding
resources in their Drop implementation, which is invoked when either the
Devres instance goes out of scope or the devres callback leads to the
resource being revoked, which implies a call to drop_in_place().

Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Link: https://lore.kernel.org/r/20241219170425.12036-9-dakr@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-20 17:19:26 +01:00
..
blk.c
bug.c
build_assert.c
build_bug.c rust: helpers: remove unnecessary header includes 2024-10-21 17:35:59 +02:00
cred.c rust: cred: add Rust abstraction for `struct cred` 2024-09-30 13:02:28 +02:00
device.c rust: add devres abstraction 2024-12-20 17:19:26 +01:00
err.c rust: helpers: remove unnecessary header includes 2024-10-21 17:35:59 +02:00
fs.c rust: file: add Rust abstraction for `struct file` 2024-09-30 13:02:28 +02:00
helpers.c rust: add devres abstraction 2024-12-20 17:19:26 +01:00
io.c rust: add `io::{Io, IoRaw}` base types 2024-12-20 17:19:26 +01:00
jump_label.c rust: add static_branch_unlikely for static_key_false 2024-11-04 16:21:44 -05:00
kunit.c rust: helpers: remove unnecessary header includes 2024-10-21 17:35:59 +02:00
mutex.c rust: helpers: remove unnecessary header includes 2024-10-21 17:35:59 +02:00
page.c
pid_namespace.c rust: add PidNamespace 2024-10-08 15:44:36 +02:00
rbtree.c rust: rbtree: add red-black tree implementation backed by the C version 2024-08-31 17:35:08 +02:00
rcu.c rust: add rcu abstraction 2024-12-20 17:19:26 +01:00
refcount.c rust: helpers: remove unnecessary header includes 2024-10-21 17:35:59 +02:00
security.c rust: security: add abstraction for secctx 2024-09-30 13:02:28 +02:00
signal.c rust: helpers: remove unnecessary header includes 2024-10-21 17:35:59 +02:00
slab.c rust: alloc: implement `KVmalloc` allocator 2024-10-15 22:56:59 +02:00
spinlock.c Rust changes for v6.13 2024-11-26 14:00:26 -08:00
task.c Rust changes for v6.13 2024-11-26 14:00:26 -08:00
uaccess.c
vmalloc.c rust: alloc: implement `Vmalloc` allocator 2024-10-15 22:56:59 +02:00
wait.c rust: helpers: remove unnecessary header includes 2024-10-21 17:35:59 +02:00
workqueue.c rust: helpers: remove unnecessary header includes 2024-10-21 17:35:59 +02:00