26 #ifndef __MOTR_DTM_DTM_INTERNAL_H__ 27 #define __MOTR_DTM_DTM_INTERNAL_H__ 48 #define up_for(o, up) \ 50 struct m0_dtm_up *up; \ 52 m0_tl_for(op, &(o)->op_ups, up) 58 #define hi_for(h, up) \ 60 struct m0_dtm_up *up; \ 62 m0_tl_for(hi, &(h)->hi_ups, up) 77 #define oper_for(o, update) \ 79 struct m0_dtm_update *update; \ 81 m0_tl_for(oper, &(o)->oprt_op.op_ups, update) 87 #define history_for(h, update) \ 89 struct m0_dtm_update *update; \ 91 m0_tl_for(history, &(h)->h_hi.hi_ups, update) 93 #define history_endfor \ 97 #define UPDATE_UP(update) \ 99 typeof(update) __update = (update); \ 100 __update != NULL ? &__update->upd_up : NULL; \ 103 #define UP_HISTORY(up) hi_history((up)->up_hi) 104 #define UPDATE_HISTORY(update) UP_HISTORY(&(update)->upd_up) 105 #define UPDATE_REM(update) (UPDATE_HISTORY(update)->h_rem) 106 #define HISTORY_DTM(history) (nu_dtm((history)->h_hi.hi_nu)) M0_INTERNAL void history_print_header(const struct m0_dtm_history *history, char *buf)
M0_INTERNAL void update_print_internal(const struct m0_dtm_update *update, bool history)
M0_INTERNAL m0_dtm_ver_t up_ver(const struct m0_dtm_up *up)
M0_TL_DECLARE(hi, M0_EXTERN, struct m0_dtm_up)
M0_INTERNAL struct m0_dtm * nu_dtm(struct m0_dtm_nu *nu)
M0_INTERNAL void up_prepared(struct m0_dtm_up *up)
M0_INTERNAL struct m0_dtm_up * hi_find(struct m0_dtm_hi *hi, m0_dtm_ver_t ver)
M0_INTERNAL struct m0_dtm_up * history_earliest(struct m0_dtm_history *history)
M0_INTERNAL struct m0_dtm_update * up_update(struct m0_dtm_up *up)
M0_INTERNAL void dtm_lock(struct m0_dtm *dtm)
M0_INTERNAL void m0_dtm_remote_global_fini(void)
M0_INTERNAL struct m0_dtm_history * hi_history(struct m0_dtm_hi *hi)
M0_INTERNAL void history_lock(const struct m0_dtm_history *history)
M0_INTERNAL void update_print(const struct m0_dtm_update *update)
M0_INTERNAL bool update_is_earlier(struct m0_dtm_update *update0, struct m0_dtm_update *update1)
M0_INTERNAL bool oper_update_unique(const struct m0_dtm_oper *oper, const struct m0_dtm_update *update)
M0_INTERNAL void update_reint(struct m0_dtm_update *update)
M0_INTERNAL m0_dtm_ver_t update_ver(const struct m0_dtm_update *update)
M0_INTERNAL void history_close(struct m0_dtm_history *history)
M0_INTERNAL void nu_lock(struct m0_dtm_nu *nu)
M0_INTERNAL bool up_is_earlier(struct m0_dtm_up *up0, struct m0_dtm_up *up1)
M0_TL_DESCR_DECLARE(hi, M0_EXTERN)
M0_INTERNAL void oper_unlock(const struct m0_dtm_oper *oper)
M0_INTERNAL void nu_unlock(struct m0_dtm_nu *nu)
M0_INTERNAL void history_unlock(const struct m0_dtm_history *history)
M0_INTERNAL bool op_state(const struct m0_dtm_op *op, enum m0_dtm_state state)
M0_INTERNAL void dtm_unlock(struct m0_dtm *dtm)
M0_INTERNAL void oper_print(const struct m0_dtm_oper *oper)
M0_INTERNAL struct m0_dtm_up * hi_earliest(struct m0_dtm_hi *hi)
M0_INTERNAL void advance_try(const struct m0_dtm_op *op)
M0_INTERNAL int m0_dtm_remote_global_init(void)
M0_INTERNAL void oper_lock(const struct m0_dtm_oper *oper)
M0_INTERNAL void history_print(const struct m0_dtm_history *history)
M0_INTERNAL struct m0_dtm_up * hi_latest(struct m0_dtm_hi *hi)
M0_INTERNAL struct m0_dtm_up * history_latest(struct m0_dtm_history *history)