Motr  M0
common.c File Reference
#include "ut/ut.h"
#include "lib/finject.h"
#include "lib/thread.h"
#include "addb2/addb2.h"
#include "addb2/ut/common.h"
Include dependency graph for common.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 

Functions

static int test_submit (struct m0_addb2_mach *mach, struct m0_addb2_trace_obj *obj)
 
static void test_idle (struct m0_addb2_mach *mach)
 
static struct m0_addb2_machgetmach (void)
 
struct m0_addb2_machmach_set (int(*s)(const struct m0_addb2_mach *, struct m0_addb2_trace *))
 
void mach_fini (struct m0_addb2_mach *m)
 
void mach_put (struct m0_addb2_mach *m)
 
static void snapshot (struct m0_addb2_sensor *s, uint64_t *area)
 
static void sensor_fini (struct m0_addb2_sensor *s)
 
int fill_one (struct m0_addb2_mach *m)
 
bool valeq (const struct m0_addb2_value *v0, const struct m0_addb2_value *v1)
 
bool receq (const struct m0_addb2_record *r0, const struct small_record *r1)
 

Variables

int submitted = 0
 
int(* submit )(const struct m0_addb2_mach *mach, struct m0_addb2_trace *trace)
 
void(* idle )(const struct m0_addb2_mach *mach)
 
static const struct m0_addb2_mach_ops test_mach_ops
 
struct m0_addb2_mach *(* m0_addb2__mach )(void)
 
static struct m0_threadmain_thread
 
static struct m0_addb2_mach__mach
 
const uint64_t SENSOR_MARKER = 0x5555555555555555
 
uint64_t seq = 0
 
bool sensor_finalised
 
const struct m0_addb2_sensor_ops sensor_ops
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 22 of file common.c.

Function Documentation

◆ getmach()

static struct m0_addb2_mach* getmach ( void  )
static

Definition at line 57 of file common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mach_put()

void mach_put ( struct m0_addb2_mach m)

Definition at line 89 of file common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sensor_fini()

static void sensor_fini ( struct m0_addb2_sensor s)
static

Definition at line 106 of file common.c.

◆ snapshot()

static void snapshot ( struct m0_addb2_sensor s,
uint64_t *  area 
)
static

Definition at line 100 of file common.c.

◆ test_idle()

static void test_idle ( struct m0_addb2_mach mach)
static

Definition at line 42 of file common.c.

◆ test_submit()

static int test_submit ( struct m0_addb2_mach mach,
struct m0_addb2_trace_obj obj 
)
static

Definition at line 36 of file common.c.

Variable Documentation

◆ __mach

struct m0_addb2_mach* __mach
static

Definition at line 55 of file common.c.

◆ main_thread

struct m0_thread* main_thread
static

Definition at line 54 of file common.c.

◆ test_mach_ops

const struct m0_addb2_mach_ops test_mach_ops
static
Initial value:
= {
.apo_submit = &test_submit,
.apo_idle = &test_idle
}
static void test_idle(struct m0_addb2_mach *mach)
Definition: common.c:42
static int test_submit(struct m0_addb2_mach *mach, struct m0_addb2_trace_obj *obj)
Definition: common.c:36

Definition at line 48 of file common.c.