Motr  M0
op.c File Reference
#include "lib/trace.h"
#include "be/op.h"
#include "lib/memory.h"
#include "lib/semaphore.h"
#include "ut/ut.h"
#include "ut/threads.h"
Include dependency graph for op.c:

Go to the source code of this file.

Data Structures

struct  be_ut_op_mt_dep
 
struct  be_ut_op_mt_thread_cfg
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define DEP(src, type, dst)   { .bod_src = src, .bod_type = type, .bod_dst = dst }
 

Enumerations

enum  be_ut_op_mt_cmd {
  BE_UT_OP_MT_INIT, BE_UT_OP_MT_WAIT1, BE_UT_OP_MT_ACTIVE, BE_UT_OP_MT_WAIT2,
  BE_UT_OP_MT_DONE, BE_UT_OP_MT_WAIT3, BE_UT_OP_MT_FINI, BE_UT_OP_MT_CMD_NR
}
 
enum  be_ut_op_mt_dep_type { BE_UT_OP_MT_WAIT_BEFORE, BE_UT_OP_MT_WAIT_AFTER }
 
enum  { BE_UT_OP_SET_USECASE_NR = 0x1000 }
 
enum  { BE_UT_OP_SET_TREE_LEVEL_SIZE = 5, BE_UT_OP_SET_TREE_LEVEL_NR = 8, BE_UT_OP_SET_TREE_RNG_SEED = 5, BE_UT_OP_SET_TREE_SHUFFLE_ITER = 0x100 }
 
enum  be_ut_op_set_tree_cmd {
  BE_UT_OP_SET_TREE_INIT, BE_UT_OP_SET_TREE_SET_ADD, BE_UT_OP_SET_TREE_STATES, BE_UT_OP_SET_TREE_FINI,
  BE_UT_OP_SET_TREE_SET_ACTIVE, BE_UT_OP_SET_TREE_SET_DONE, BE_UT_OP_SET_TREE_ASSERT_DONE, BE_UT_OP_SET_TREE_ASSERT_NOT_DONE
}
 

Functions

void m0_be_ut_op_usecase (void)
 
static void be_ut_op_mt_thread_func (void *param)
 
 M0_UT_THREADS_DEFINE (be_ut_op_mt, &be_ut_op_mt_thread_func)
 
void m0_be_ut_op_mt (void)
 
void m0_be_ut_op_set_usecase (void)
 
static void be_ut_op_set_tree_swap (unsigned *a, unsigned *b)
 
static void be_ut_op_set_tree_random_shuffle (unsigned *arr, unsigned nr, bool keep_half_dist_order, uint64_t *seed)
 
static void be_ut_op_set_tree_do (struct m0_be_op *op, struct m0_be_op *child, enum be_ut_op_set_tree_cmd cmd)
 
static void be_ut_op_set_tree_recursive (struct m0_be_op *op, enum be_ut_op_set_tree_cmd cmd, int level, int index, uint64_t *seed)
 
void m0_be_ut_op_set_tree (void)
 

Macro Definition Documentation

◆ DEP

#define DEP (   src,
  type,
  dst 
)    { .bod_src = src, .bod_type = type, .bod_dst = dst }