32 static void _log(
char c1,
char c2)
35 size_t len = strlen(
g_log);
39 rc = snprintf(
g_log + len,
sizeof(
g_log) - len,
"%c%c", c1, c2);
156 #define ARR_INIT(name) name, ARRAY_SIZE(name) 157 #define MOD_REC(name, nr_levels) \ 158 { (nr_levels), ARR_INIT(dep_ ## name), ARR_INIT(inv_ ## name) } 184 mods[
i].dep_nr *
sizeof modules[
i].m_dep[0]);
186 mods[
i].inv_nr *
sizeof modules[
i].m_inv[0]);
346 memcpy(self->m_dep, deps,
sizeof deps);
349 memcpy(self->m_inv, deps,
sizeof deps);
static struct m0_dtm_local_remote local
static const char * kv_get(const struct m0_param_source *_, const char *key)
static struct m0_moddep inv_h[]
static struct m0_moddep dep_c[]
static struct m0_moddep dep_b[]
int m0_thread_join(struct m0_thread *q)
M0_INTERNAL void m0_set(struct m0 *instance)
static struct m0_module modules[]
static int modlev_a2_enter(struct m0_module *module)
static struct m0_moddep inv_f[]
static void amb_setup(struct amb *amb, struct m0_module *bar)
static struct m0 * g_instance
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
M0_INTERNAL struct m0 * m0_get(void)
static int cur(enum module_id id)
static int modlev_enter(struct m0_module *module)
M0_INTERNAL void m0_param_source_del(struct m0_param_source *src)
static void _test_module_alt_init(void)
static struct m0_moddep inv_a[]
static const struct m0_modlev levels[]
M0_INTERNAL void * m0_param_get(const char *key)
static void inherit(int _)
static void test_param(void)
struct m0_ut_suite module_ut
static void modlev_leave(struct m0_module *module)
static struct m0_moddep dep_a[]
static struct m0_moddep inv_i[]
static void test_instance(void)
static void _test_module_dep_add(void)
static struct m0_moddep dep_f[]
static struct m0_moddep inv_b[]
static struct m0_addb2_callback c
static struct m0_thread t[8]
int(* ml_enter)(struct m0_module *module)
static void _test_module_fini_all(void)
#define MOD_REC(name, nr_levels)
#define m0_forall(var, nr,...)
static void _test_module_init(void)
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 void _test_module_fini(void)
static struct m0_moddep dep_e[]
static struct m0_moddep inv_c[]
M0_INTERNAL void m0_param_source_add(struct m0_param_source *src)
static struct m0_moddep dep_i[]
static struct m0_moddep inv_d[]
#define IS_IN_ARRAY(idx, array)
static struct m0_moddep inv_e[0]
static struct m0_moddep inv_g[]
static void test_module(void)
static struct m0_moddep dep_d[]
static struct m0_moddep dep_g[]
static struct gen g[MAX_GEN]
static struct m0_moddep dep_h[0]
static struct m0_addb2_source * s
M0_INTERNAL void m0_module_fini(struct m0_module *module, int level)
const struct m0_modlev * m_level
static void _log(char c1, char c2)
M0_INTERNAL int m0_module_init(struct m0_module *module, int level)
static void foobar_setup(struct m0_module *self, const char *name, struct m0_module *other, bool source)