Motr  M0
nucleus.c File Reference
#include "lib/bob.h"
#include "lib/misc.h"
#include "lib/arith.h"
#include "lib/tlist.h"
#include "lib/errno.h"
#include "lib/assert.h"
#include "lib/trace.h"
#include "motr/magic.h"
#include "dtm/nucleus.h"
#include "dtm/dtm_internal.h"
Include dependency graph for nucleus.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DTM
 

Enumerations

enum  m0_dtm_ver_cmp { LATE = -1, READY = 0, EARLY = +1, MISER }
 

Functions

 M0_TL_DESCR_DEFINE (hi, "nucleus hi updates", M0_INTERNAL, struct m0_dtm_up, up_hi_linkage, up_magix, M0_DTM_UP_MAGIX, M0_DTM_HI_MAGIX)
 
 M0_TL_DEFINE (hi, M0_INTERNAL, struct m0_dtm_up)
 
 M0_TL_DESCR_DEFINE (op, "nucleus operation updates", M0_INTERNAL, struct m0_dtm_up, up_op_linkage, up_magix, M0_DTM_UP_MAGIX, M0_DTM_OP_MAGIX)
 
 M0_TL_DEFINE (op, M0_INTERNAL, struct m0_dtm_up)
 
 M0_BOB_DEFINE (static, &hi_bob, m0_dtm_hi)
 
 M0_BOB_DEFINE (static, &up_bob, m0_dtm_up)
 
 M0_BOB_DEFINE (static, &op_bob, m0_dtm_op)
 
static void advance_hi (struct m0_dtm_hi *hi)
 
static void advance_op (struct m0_dtm_op *op)
 
static void up_ready (struct m0_dtm_up *up)
 
static void up_insert (struct m0_dtm_up *up)
 
static int op_cmp (const struct m0_dtm_op *op)
 
static void up_del (struct m0_dtm_up *up)
 
static int up_cmp (const struct m0_dtm_up *up, m0_dtm_ver_t hver)
 
static void up_fini (struct m0_dtm_up *up)
 
M0_INTERNAL void m0_dtm_op_init (struct m0_dtm_op *op, struct m0_dtm_nu *nu)
 
M0_INTERNAL void m0_dtm_op_close (const struct m0_dtm_op *op)
 
M0_INTERNAL void m0_dtm_op_prepared (const struct m0_dtm_op *op)
 
M0_INTERNAL void m0_dtm_op_done (const struct m0_dtm_op *op)
 
static void op_del (struct m0_dtm_op *op)
 
M0_INTERNAL void m0_dtm_op_del (struct m0_dtm_op *op)
 
M0_INTERNAL void m0_dtm_op_fini (struct m0_dtm_op *op)
 
M0_INTERNAL void advance_try (const struct m0_dtm_op *op)
 
M0_INTERNAL void up_prepared (struct m0_dtm_up *up)
 
M0_INTERNAL void m0_dtm_hi_init (struct m0_dtm_hi *hi, struct m0_dtm_nu *nu)
 
M0_INTERNAL void m0_dtm_hi_fini (struct m0_dtm_hi *hi)
 
M0_INTERNAL void m0_dtm_up_init (struct m0_dtm_up *up, struct m0_dtm_hi *hi, struct m0_dtm_op *op, enum m0_dtm_up_rule rule, m0_dtm_ver_t ver, m0_dtm_ver_t orig_ver)
 
M0_INTERNAL void m0_dtm_nu_init (struct m0_dtm_nu *nu)
 
M0_INTERNAL void m0_dtm_nu_fini (struct m0_dtm_nu *nu)
 
M0_INTERNAL struct m0_dtm_upm0_dtm_up_prior (struct m0_dtm_up *up)
 
M0_INTERNAL struct m0_dtm_upm0_dtm_up_later (struct m0_dtm_up *up)
 
M0_INTERNAL struct m0_dtm_uphi_latest (struct m0_dtm_hi *hi)
 
M0_INTERNAL struct m0_dtm_uphi_earliest (struct m0_dtm_hi *hi)
 
M0_INTERNAL struct m0_dtm_uphi_find (struct m0_dtm_hi *hi, m0_dtm_ver_t ver)
 
M0_INTERNAL m0_dtm_ver_t up_ver (const struct m0_dtm_up *up)
 
M0_INTERNAL bool up_is_earlier (struct m0_dtm_up *up0, struct m0_dtm_up *up1)
 
static bool op_is_locked (const struct m0_dtm_op *op)
 
static bool up_pair_invariant (const struct m0_dtm_up *up, const struct m0_dtm_up *next)
 
M0_INTERNAL bool m0_dtm_hi_invariant (const struct m0_dtm_hi *hi)
 
M0_INTERNAL bool m0_dtm_up_invariant (const struct m0_dtm_up *up)
 
M0_INTERNAL bool m0_dtm_op_invariant (const struct m0_dtm_op *op)
 
M0_INTERNAL bool op_state (const struct m0_dtm_op *op, enum m0_dtm_state state)
 
M0_INTERNAL void m0_dtm_nuclei_init (void)
 
M0_INTERNAL void m0_dtm_nuclei_fini (void)
 
M0_INTERNAL void nu_lock (struct m0_dtm_nu *nu)
 
M0_INTERNAL void nu_unlock (struct m0_dtm_nu *nu)
 
M0_INTERNAL void up_print (const struct m0_dtm_up *up)
 
M0_INTERNAL void op_print (const struct m0_dtm_op *op)
 
M0_INTERNAL void hi_print (const struct m0_dtm_hi *hi)
 

Variables

static const struct m0_bob_type hi_bob
 
static const struct m0_bob_type op_bob
 
static struct m0_bob_type up_bob