#include "lib/trace.h"
#include "lib/memory.h"
#include "lib/string.h"
#include "lib/misc.h"
#include "lib/buf.h"
#include "fid/fid.h"
#include "fop/fom.h"
#include "stob/io.h"
#include "iscservice/isc.h"
#include "util.h"
#include "common.h"
#include "libdemo.h"
#include "libdemo_xc.h"
Go to the source code of this file.
|
static bool | is_valid_string (struct m0_buf *in) |
|
int | hello_world (struct m0_buf *in, struct m0_buf *out, struct m0_isc_comp_private *comp_data, int *rc) |
|
int | launch_io (struct m0_isc_comp_private *pdata, struct m0_buf *in, int *rc) |
|
int | compute_minmax (enum op op, struct m0_isc_comp_private *pdata, struct m0_buf *out, int *rc) |
|
int | do_minmax (enum op op, struct m0_buf *in, struct m0_buf *out, struct m0_isc_comp_private *data, int *rc) |
|
int | comp_min (struct m0_buf *in, struct m0_buf *out, struct m0_isc_comp_private *comp_data, int *rc) |
|
int | comp_max (struct m0_buf *in, struct m0_buf *out, struct m0_isc_comp_private *comp_data, int *rc) |
|
static void | comp_reg (const char *f_name, int(*ftn)(struct m0_buf *arg_in, struct m0_buf *args_out, struct m0_isc_comp_private *comp_data, int *rc)) |
|
void | motr_lib_init (void) |
|
◆ op
◆ comp_max()
◆ comp_min()
Compute minimum value in the unit data.
The computation function interface is defined at isc.h: the arguments and result are xcoded at and buffers, contains private data for the computation which is preserved between the two calls of this function (before reading the data from the storage device and after the read is finished). contains the result of the computation.
- Returns
- M0_FSO_WAIT after read I/O is started (rc should be == -EAGAIN also)
-
M0_FSO_AGAIN after the computation is complete
Definition at line 222 of file libdemo.c.
◆ comp_reg()
◆ compute_minmax()
◆ do_minmax()
Do the computation of min/max.
This function is called two times by the ISC-implementation. The 1st time we start the I/O to read the data from the object unit, and return M0_FSO_WAIT and -EAGAIN in rc argument as an indication that the function should be called again when the data is ready. When I/O is complete and the data is ready, the function is called again so we can actually do the computation.
Definition at line 183 of file libdemo.c.
◆ hello_world()
◆ is_valid_string()
static bool is_valid_string |
( |
struct m0_buf * |
in | ) |
|
|
static |
◆ launch_io()
◆ motr_lib_init()
void motr_lib_init |
( |
void |
| ) |
|