Motr  M0
fom_interpose.h File Reference
#include "fop/fom.h"
Include dependency graph for fom_interpose.h:

Go to the source code of this file.

Data Structures

struct  m0_fom_interpose
 
struct  m0_fom_interpose_ops
 
struct  m0_fom_thralldom
 

Macros

#define __MOTR_FOP_FOM_INTERPOSE_H__
 

Functions

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))
 

Macro Definition Documentation

◆ __MOTR_FOP_FOM_INTERPOSE_H__

#define __MOTR_FOP_FOM_INTERPOSE_H__

Definition at line 26 of file fom_interpose.h.

Function Documentation

◆ 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: