-
- Downloads
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>
Showing
- MAINTAINERS 1 addition, 0 deletionsMAINTAINERS
- rust/helpers/device.c 10 additions, 0 deletionsrust/helpers/device.c
- rust/helpers/helpers.c 1 addition, 0 deletionsrust/helpers/helpers.c
- rust/kernel/devres.rs 178 additions, 0 deletionsrust/kernel/devres.rs
- rust/kernel/lib.rs 1 addition, 0 deletionsrust/kernel/lib.rs
Loading
Please register or sign in to comment