Skip to main content

kernel_module

Macro kernel_module 

Source
macro_rules! kernel_module {
    (
	    type: $ty:ty,
	    name: $name:literal,
	    $(description: $description:literal,)?
	    $(author: $author:literal,)?
	    license: $license:tt$(,)?
    ) => { ... };
}
Available on crate feature full only.
Expand description

Registers a kernel module with the kernel.

The type argument should be a type implementing the Module trait.

Additionally, it also takes the following arguments in order:

  • name - a user facing name for the module
  • description (optional) - a user facing description of the module
  • author (optional) - the author of the module
  • license - An SPDX license identifier (currently only MPL-* is accepted)

ยงExamples

See the module-level documentation.