rust/kernel/drm/driver.rs

Source file repositories/reference/linux-study-clean/rust/kernel/drm/driver.rs

File Facts

System
Linux kernel
Corpus path
rust/kernel/drm/driver.rs
Extension
.rs
Size
7052 bytes
Lines
204
Domain
Rust Kernel Layer
Bucket
Rust API Membrane
Inferred role
Rust Kernel Layer: implementation source
Status
source implementation candidate

Why This File Exists

Rust-side wrappers and abstractions around kernel C APIs, ownership contracts, allocation, synchronization, and module integration.

Dependency Surface

Detected Declarations

Annotated Snippet

fn drop(&mut self) {
        // SAFETY: Safe by the invariant of `ARef<drm::Device<T>>`. The existence of this
        // `Registration` also guarantees the this `drm::Device` is actually registered.
        unsafe { bindings::drm_dev_unregister(self.0.as_raw()) };
    }
}

Annotation

Implementation Notes