Motr  M0
m0_module_type Struct Reference

#include <module.h>

Collaboration diagram for m0_module_type:
Collaboration graph

Data Fields

const char * mt_name
 
struct m0_module *(* mt_create )(struct m0 *instance)
 

Detailed Description

"Module factory".

Definition at line 184 of file module.h.

Field Documentation

◆ mt_create

struct m0_module*(* mt_create) (struct m0 *instance)

Allocates and configures a module.

Usually an ambient structure is allocated, which m0_module is embedded into. Then module levels are assigned and dependencies added. Module-specific data (e.g., the address of module) may be stored in m0::i_moddata[] or m0::i_lockers.

Note
It is caller's responsibility to free any memory allocated by the implementation and clear the corresponding cell in m0::i_moddata[] or m0::i_lockers.

Definition at line 199 of file module.h.

◆ mt_name

const char* mt_name

Human-readable name (useful for debugging).

Definition at line 186 of file module.h.


The documentation for this struct was generated from the following file: