Motr  M0
cs_service.c File Reference
#include "lib/errno.h"
#include "lib/memory.h"
#include "reqh/reqh_service.h"
#include "ut/cs_fop.h"
Include dependency graph for cs_service.c:

Go to the source code of this file.

Functions

static int ds1_service_start (struct m0_reqh_service *service)
 
static int ds2_service_start (struct m0_reqh_service *service)
 
static void ds1_service_stop (struct m0_reqh_service *service)
 
static void ds2_service_stop (struct m0_reqh_service *service)
 
static int ds1_service_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
static int ds2_service_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
static void ds_service_fini (struct m0_reqh_service *service)
 
static int _ds_alloc (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype, const struct m0_reqh_service_ops *ops)
 
int m0_cs_default_stypes_init (void)
 
void m0_cs_default_stypes_fini (void)
 

Variables

static const struct m0_reqh_service_type_ops ds1_service_type_ops
 
static const struct m0_reqh_service_type_ops ds2_service_type_ops
 
static const struct m0_reqh_service_ops ds1_service_ops
 
static const struct m0_reqh_service_ops ds2_service_ops
 
struct m0_reqh_service_type ds1_service_type
 
struct m0_reqh_service_type ds2_service_type
 
struct m0_reqh_service_typem0_cs_default_stypes []
 
const size_t m0_cs_default_stypes_nr = ARRAY_SIZE(m0_cs_default_stypes)
 

Function Documentation

◆ _ds_alloc()

static int _ds_alloc ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype,
const struct m0_reqh_service_ops ops 
)
static

Definition at line 79 of file cs_service.c.

Here is the caller graph for this function:

◆ ds1_service_allocate()

static int ds1_service_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Definition at line 98 of file cs_service.c.

Here is the call graph for this function:

◆ ds1_service_start()

static int ds1_service_start ( struct m0_reqh_service service)
static

Definition at line 110 of file cs_service.c.

Here is the call graph for this function:

◆ ds1_service_stop()

static void ds1_service_stop ( struct m0_reqh_service service)
static

Definition at line 136 of file cs_service.c.

Here is the call graph for this function:

◆ ds2_service_allocate()

static int ds2_service_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Definition at line 104 of file cs_service.c.

Here is the call graph for this function:

◆ ds2_service_start()

static int ds2_service_start ( struct m0_reqh_service service)
static

Definition at line 123 of file cs_service.c.

Here is the call graph for this function:

◆ ds2_service_stop()

static void ds2_service_stop ( struct m0_reqh_service service)
static

Definition at line 145 of file cs_service.c.

Here is the call graph for this function:

◆ ds_service_fini()

static void ds_service_fini ( struct m0_reqh_service service)
static

Definition at line 154 of file cs_service.c.

Here is the call graph for this function:

◆ m0_cs_default_stypes_fini()

void m0_cs_default_stypes_fini ( void  )

Definition at line 174 of file cs_service.c.

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

◆ m0_cs_default_stypes_init()

int m0_cs_default_stypes_init ( void  )

Definition at line 161 of file cs_service.c.

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

Variable Documentation

◆ ds1_service_ops

const struct m0_reqh_service_ops ds1_service_ops
static
Initial value:
= {
.rso_start = ds1_service_start,
.rso_stop = ds1_service_stop,
.rso_fini = ds_service_fini
}
static void ds1_service_stop(struct m0_reqh_service *service)
Definition: cs_service.c:136
static void ds_service_fini(struct m0_reqh_service *service)
Definition: cs_service.c:154
static int ds1_service_start(struct m0_reqh_service *service)
Definition: cs_service.c:110
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
Definition: reqh_service.c:601

Definition at line 47 of file cs_service.c.

◆ ds1_service_type

struct m0_reqh_service_type ds1_service_type
Initial value:
= {
.rst_name = "M0_CST_DS1",
.rst_ops = &ds1_service_type_ops,
.rst_level = M0_RS_LEVEL_NORMAL,
}
static const struct m0_reqh_service_type_ops ds1_service_type_ops
Definition: cs_service.c:39

Definition at line 60 of file cs_service.c.

◆ ds1_service_type_ops

const struct m0_reqh_service_type_ops ds1_service_type_ops
static
Initial value:
= {
.rsto_service_allocate = ds1_service_allocate
}
static int ds1_service_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: cs_service.c:98

Definition at line 39 of file cs_service.c.

◆ ds2_service_ops

const struct m0_reqh_service_ops ds2_service_ops
static
Initial value:
= {
.rso_start = ds2_service_start,
.rso_stop = ds2_service_stop,
.rso_fini = ds_service_fini
}
static int ds2_service_start(struct m0_reqh_service *service)
Definition: cs_service.c:123
static void ds_service_fini(struct m0_reqh_service *service)
Definition: cs_service.c:154
static void ds2_service_stop(struct m0_reqh_service *service)
Definition: cs_service.c:145

Definition at line 54 of file cs_service.c.

◆ ds2_service_type

struct m0_reqh_service_type ds2_service_type
Initial value:
= {
.rst_name = "M0_CST_DS2",
.rst_ops = &ds2_service_type_ops,
.rst_level = M0_RS_LEVEL_NORMAL,
}
static const struct m0_reqh_service_type_ops ds2_service_type_ops
Definition: cs_service.c:43

Definition at line 66 of file cs_service.c.

◆ ds2_service_type_ops

const struct m0_reqh_service_type_ops ds2_service_type_ops
static
Initial value:
= {
.rsto_service_allocate = ds2_service_allocate
}
static int ds2_service_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: cs_service.c:104

Definition at line 43 of file cs_service.c.

◆ m0_cs_default_stypes

struct m0_reqh_service_type* m0_cs_default_stypes[]
Initial value:
= {
}
struct m0_reqh_service_type ds2_service_type
Definition: cs_service.c:66
struct m0_reqh_service_type ds1_service_type
Definition: cs_service.c:60

Definition at line 72 of file cs_service.c.

◆ m0_cs_default_stypes_nr

const size_t m0_cs_default_stypes_nr = ARRAY_SIZE(m0_cs_default_stypes)

Definition at line 77 of file cs_service.c.