pub trait NeedsLockClass {
    fn init(
        self: Pin<&mut Self>,
        name: &'static CStr,
        key1: &'static LockClassKey,
        key2: &'static LockClassKey
    ); }
Expand description

A trait for types that need a lock class during initialisation.

Implementers of this trait benefit from the [init_with_lockdep] macro that generates a new class for each initialisation call site.

Required Methods

Initialises the type instance so that it can be safely used.

Callers are encouraged to use the [init_with_lockdep] macro as it automatically creates a new lock class on each usage.

Implementors

This documentation is an old archive. Please see https://rust.docs.kernel.org instead.