22 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT 45 #define _S(name, flags, allowed) \ 49 .sd_allowed = allowed \ 87 #define F M0_CO_FRAME_DATA 88 #define LR M0_FOM_LONG_LOCK_RETURN 176 M0_LOG(
M0_DEBUG,
"tree=%p tree.delete=%d, tree.insert=%d k=%d v=%d",
static struct m0_semaphore insert2
M0_INTERNAL void m0_long_lock_fini(struct m0_long_lock *lock)
struct m0_reqh * m0_ut__reqh_init(void)
M0_INTERNAL void m0_long_lock_link_init(struct m0_long_lock_link *link, struct m0_fom *fom, struct m0_long_lock_addb2 *addb2)
static struct m0_co_context * CO(struct m0_fom *fom)
static struct m0_semaphore ready
static struct m0_semaphore delete2
M0_INTERNAL void m0_co_context_fini(struct m0_co_context *context)
static struct m0_semaphore delete1
void m0_test_coroutine2(void)
#define M0_LOG(level,...)
M0_INTERNAL void m0_co_op_reset(struct m0_co_op *op)
static struct m0_semaphore insert1
static void insert(struct m0_fom *fom, struct test_tree *tree, int k, int v)
M0_INTERNAL void m0_co_op_init(struct m0_co_op *op)
M0_INTERNAL void m0_long_write_unlock(struct m0_long_lock *lock, struct m0_long_lock_link *link)
#define M0_CO_START(context)
#define M0_CO_END(context)
static struct m0_fom_simple fom_simple
M0_INTERNAL bool m0_long_write_lock(struct m0_long_lock *lk, struct m0_long_lock_link *link, int next_phase)
#define M0_CO_YIELD_RC(context, rc)
M0_INTERNAL void m0_co_op_fini(struct m0_co_op *op)
static struct m0_co_context fom_context
M0_INTERNAL void m0_long_lock_link_fini(struct m0_long_lock_link *link)
M0_INTERNAL int m0_co_op_tick_ret(struct m0_co_op *op, struct m0_fom *fom, int next_state)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
static struct m0_sm_conf coroutine2_conf
#define M0_CO_YIELD(context)
#define _S(name, flags, allowed)
void m0_ut__reqh_fini(void)
static void crud(struct m0_fom *fom, struct test_tree *tree, int k, int v)
M0_INTERNAL void m0_co_op_active(struct m0_co_op *op)
#define M0_CO_FUN(context, function)
M0_INTERNAL void m0_long_lock_init(struct m0_long_lock *lock)
static struct m0_long_lock fom_lock
static struct m0_sm_state_descr coroutine2_states[C2_NR]
static void wait_for_coroutine_fom(void)
M0_INTERNAL int m0_co_context_init(struct m0_co_context *context)
static struct m0_co_op fom_op
static struct test_tree fom_tree
#define M0_CO_REENTER(context,...)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
static void test_run(void)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
static int coroutine_fom_tick(struct m0_fom *fom, int *x, int *__unused)
#define M0_FOM_SIMPLE_POST(s, r, c, t, f, d, l)
M0_INTERNAL void m0_co_op_done(struct m0_co_op *op)
static struct m0_co_op * OP(struct m0_fom *fom)