75 .rhia_mdstore = (
void*)1,
93 unsigned idx = a -
ast;
227 for (
i = 0;
i <
NR; ++
i)
230 for (
i = 0;
i <
NR; ++
i)
239 (
core[j] != 0) == (j < online.
b_nr &&
265 memset(
s, 0,
sizeof s);
287 static int ctor(
void *area,
void *cookie)
290 ((
char *)area)[0] =
'x';
311 *(
long *)place = (
long)chore + (long)loc + (
long)place;
321 M0_UT_ASSERT(*(
long *)place == (
long)chore + (
long)loc + (
long)place);
355 memset(
sem, 0,
sizeof sem);
356 memset(
ast, 0,
sizeof ast);
357 memset(
s, 0,
sizeof s);
static void m0_atomic64_inc(struct m0_atomic64 *a)
M0_INTERNAL void m0_fom_wakeup(struct m0_fom *fom)
M0_INTERNAL int m0_reqh_service_start(struct m0_reqh_service *service)
M0_INTERNAL int m0_bitmap_init(struct m0_bitmap *map, size_t nr)
M0_INTERNAL void m0_reqh_services_terminate(struct m0_reqh *reqh)
static void fom_simple_svc_start(void)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
static void tick(struct m0_locality_chore *chore, struct m0_locality *loc, void *place)
M0_INTERNAL struct m0_locality * m0_locality_get(uint64_t value)
M0_INTERNAL void m0_bitmap_fini(struct m0_bitmap *map)
void * m0_locality_data(int key)
static int semisimple_tick(struct m0_fom *fom, int *x, int *phase)
void(* sa_cb)(struct m0_sm_group *grp, struct m0_sm_ast *)
static struct m0_sm_conf semisimple_conf
#define M0_REQH_INIT(reqh,...)
static struct m0_sm_state_descr semisimple_phases[]
static struct m0_sm_group * grp
M0_INTERNAL m0_processor_nr_t m0_processor_nr_max(void)
M0_INTERNAL void m0_sm_ast_post(struct m0_sm_group *grp, struct m0_sm_ast *ast)
static struct m0_reqh reqh
#define M0_FID_INIT(container, key)
static void leave(struct m0_locality_chore *chore, struct m0_locality *loc, void *place)
static struct m0_semaphore sem[NR]
void free_func(struct m0_fom_simple *sfom)
static int cat_tick(struct m0_fom *fom, void *null, int *__unused)
M0_INTERNAL m0_processor_nr_t m0_processor_id_get(void)
#define container_of(ptr, type, member)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL void m0_reqh_fini(struct m0_reqh *reqh)
M0_INTERNAL struct m0_reqh_service_type * m0_reqh_service_type_find(const char *sname)
static struct m0_sm_ast ast[NR]
void m0_locality_data_free(int key)
static bool free_func_called
static const struct socktype stype[]
static struct m0_fom_simple s[NR]
struct m0_reqh * m0_ut__reqh_init(void)
M0_INTERNAL bool m0_reqh_service_invariant(const struct m0_reqh_service *svc)
M0_INTERNAL void m0_reqh_shutdown(struct m0_reqh *reqh)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
M0_INTERNAL void m0_processors_online(struct m0_bitmap *map)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
int m0_locality_chore_init(struct m0_locality_chore *chore, const struct m0_locality_chore_ops *ops, void *datum, m0_time_t interval, size_t datasize)
M0_INTERNAL int m0_reqh_service_allocate(struct m0_reqh_service **out, const struct m0_reqh_service_type *stype, struct m0_reqh_context *rctx)
static struct m0_atomic64 hoarded
void m0_ut__reqh_fini(void)
M0_INTERNAL void m0_reqh_service_init(struct m0_reqh_service *service, struct m0_reqh *reqh, const struct m0_fid *fid)
static int ctor(void *area, void *cookie)
static struct m0_mutex lock
M0_INTERNAL void m0_fom_simple_hoard(struct m0_fom_simple *cat, size_t nr, struct m0_reqh *reqh, struct m0_sm_conf *conf, int(*tick)(struct m0_fom *, void *, int *), void(*free)(struct m0_fom_simple *sfom), void *data)
M0_INTERNAL struct m0_locality * m0_locality_here(void)
static int enter(struct m0_locality_chore *chore, struct m0_locality *loc, void *place)
M0_INTERNAL void m0_reqh_idle_wait(struct m0_reqh *reqh)
static int64_t m0_atomic64_get(const struct m0_atomic64 *a)
#define m0_forall(var, nr,...)
static int tick_once(struct m0_fom *fom, int *x, int *__unused)
void m0_locality_chore_fini(struct m0_locality_chore *chore)
M0_INTERNAL void m0_reqh_start(struct m0_reqh *reqh)
static void _cb0(struct m0_sm_group *grp, struct m0_sm_ast *a)
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
M0_INTERNAL struct m0_fom_domain * m0_fom_dom(void)
M0_INTERNAL bool m0_bitmap_get(const struct m0_bitmap *map, size_t idx)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
#define IS_IN_ARRAY(idx, array)
static void m0_fi_enable_once(const char *func, const char *tag)
#define M0_MKTIME(secs, ns)
int m0_locality_data_alloc(size_t nob, int(*ctor)(void *, void *), void(*dtor)(void *, void *), void *datum)
static int nosys(struct m0_locality_chore *chore, struct m0_locality *loc, void *place)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
void test_locality_chore(void)
#define M0_FOM_SIMPLE_POST(s, r, c, t, f, d, l)
static int simple_tick(struct m0_fom *fom, int *x, int *__unused)
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
struct m0_fid g_process_fid
static void m0_atomic64_set(struct m0_atomic64 *a, int64_t num)