Motr  M0
fom_interpose.c File Reference
#include "lib/assert.h"
#include "lib/misc.h"
#include "lib/buf.h"
#include "fop/fop.h"
#include "fop/fom_interpose.h"
Include dependency graph for fom_interpose.c:

Go to the source code of this file.

Enumerations

enum  { INTERPOSE_CONT = M0_FSO_NR + 1 }
 

Functions

static int thrall_finish (struct m0_fom *fom, struct m0_fom_interpose *proxy, int result)
 
static int interpose_tick (struct m0_fom *fom)
 
M0_INTERNAL void m0_fom_interpose_enter (struct m0_fom *fom, struct m0_fom_interpose *proxy)
 
M0_INTERNAL void m0_fom_interpose_leave (struct m0_fom *fom, struct m0_fom_interpose *proxy)
 
M0_INTERNAL void m0_fom_enthrall (struct m0_fom *leader, struct m0_fom *serf, struct m0_fom_thralldom *thrall, void(*end)(struct m0_fom_thralldom *thrall, struct m0_fom *serf))
 

Variables

enum { ... }  M0_XCA_DOMAIN
 
static const struct m0_fom_interpose_ops thrall_ops
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
INTERPOSE_CONT 

Definition at line 30 of file fom_interpose.c.

Function Documentation

◆ interpose_tick()

static int interpose_tick ( struct m0_fom fom)
static

Definition at line 41 of file fom_interpose.c.

Here is the caller graph for this function:

◆ m0_fom_enthrall()

M0_INTERNAL void m0_fom_enthrall ( struct m0_fom leader,
struct m0_fom serf,
struct m0_fom_thralldom thrall,
void(*)(struct m0_fom_thralldom *thrall, struct m0_fom *serf)  end 
)

Arranges for the leader to be woken up once the serf reaches M0_FOM_PHASE_FINISH, should be called by leader fom. It is up to the caller to make sure the serf is actually executing and that the leader goes to sleep.

Note
It is not required to initialise thrall context before call, all context preparation is done inside of this function.

Definition at line 102 of file fom_interpose.c.

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

◆ m0_fom_interpose_enter()

M0_INTERNAL void m0_fom_interpose_enter ( struct m0_fom fom,
struct m0_fom_interpose proxy 
)

Activates the interposition by substitution of original fom tick function with interposition tick.

Definition at line 81 of file fom_interpose.c.

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

◆ m0_fom_interpose_leave()

M0_INTERNAL void m0_fom_interpose_leave ( struct m0_fom fom,
struct m0_fom_interpose proxy 
)

Disables the interposition by restoring of original fom tick function.

Definition at line 95 of file fom_interpose.c.

Here is the caller graph for this function:

◆ thrall_finish()

static int thrall_finish ( struct m0_fom fom,
struct m0_fom_interpose proxy,
int  result 
)
static

Definition at line 65 of file fom_interpose.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_XCA_DOMAIN

enum { ... } M0_XCA_DOMAIN

◆ thrall_ops

const struct m0_fom_interpose_ops thrall_ops
static
Initial value:
= {
.io_post = {
}
}
int(* io_post[64])(struct m0_fom *fom, struct m0_fom_interpose *proxy, int result)
Definition: fom_interpose.h:71
static int thrall_finish(struct m0_fom *fom, struct m0_fom_interpose *proxy, int result)
Definition: fom_interpose.c:65
static const struct m0_fom_interpose_ops thrall_ops
Definition: fom_interpose.c:35
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 35 of file fom_interpose.c.