64 _0C(
md->md_other != mod) &&
68 md->md_dst <
md->md_other->m_level_nr) &&
71 md->md_other->m_cur >=
md->md_dst)) &&
76 const struct m0_moddep *md1 =
77 &md->md_other->m_inv[j];
79 md1->md_other == mod &&
80 md1->md_src == md->md_src &&
81 md1->md_dst == md->md_dst;
90 M0_PRE(level < module->m_level_nr);
98 for (
i = 0;
i < module->
m_dep_nr && result == 0; ++
i) {
147 while (level < module->m_cur &&
158 if (
md->md_src ==
cur) {
180 m0->m_dep[
m0->m_dep_nr++] =
184 m1->m_inv[m1->m_inv_nr++] =
202 .m_level_nr = level_nr
static bool module_invariant(const struct m0_module *mod)
static int module_up(struct m0_module *module, int level)
static bool moddeps_are_unique(const struct m0_moddep *arr, unsigned n)
#define m0_count(var, nr,...)
enum m0_trace_level level
static struct m0_mdstore md
#define m0_exists(var, nr,...)
static int cur(enum module_id id)
M0_INTERNAL bool m0_elems_are_unique(const void *array, unsigned nr_elems, size_t elem_size)
void(* ml_leave)(struct m0_module *module)
struct m0_moddep m_inv[M0_MODDEP_MAX]
struct m0_module * md_other
unsigned m_level_nrefs[M0_MODLEV_MAX]
int(* ml_enter)(struct m0_module *module)
M0_INTERNAL void m0_module_setup(struct m0_module *module, const char *name, const struct m0_modlev *level, int level_nr, struct m0 *instance)
#define m0_forall(var, nr,...)
M0_INTERNAL void m0_module_dep_add(struct m0_module *m0, int l0, struct m0_module *m1, int l1)
#define M0_MODDEP_INIT(other, src, dst)
static struct m0 instance
M0_INTERNAL void m0_module_fini(struct m0_module *module, int level)
const struct m0_modlev * m_level
struct m0_moddep m_dep[M0_MODDEP_MAX]
M0_INTERNAL int m0_module_init(struct m0_module *module, int level)