#include "ross-types.h"
#include <stdbool.h>
#include <stdio.h>
Go to the source code of this file.
Data Structures | |
struct | crv_checkpointer |
struct | crv_lpstate_checkpoint_internal |
Typedefs | |
typedef void(* | save_checkpoint_state_f) (void *into, void const *from) |
typedef void(* | clean_checkpoint_state_f) (void *state) |
typedef bool(* | check_states_f) (void *current_state, void const *before_state) |
typedef void(* | print_lpstate_f) (FILE *, char const *prefix, void *state) |
typedef void(* | print_checkpoint_state_f) (FILE *, char const *prefix, void *state) |
typedef void(* | print_event_f) (FILE *, char const *prefix, void *lp_state, void *event_msg) |
typedef struct crv_checkpointer | crv_checkpointer |
typedef struct crv_lpstate_checkpoint_internal | crv_lpstate_checkpoint_internal |
Functions | |
void | crv_add_custom_state_checkpoint (crv_checkpointer *) |
size_t | crv_init_checkpoints (void) |
void | crv_copy_lpstate (crv_lpstate_checkpoint_internal *into, tw_lp const *clp) |
void | crv_clean_lpstate (crv_lpstate_checkpoint_internal *state, tw_lp const *clp) |
void | crv_check_lpstates (tw_lp *clp, tw_event *cev, crv_lpstate_checkpoint_internal const *before_state, char const *before_msg, char const *after_msg) |
typedef bool(* check_states_f) (void *current_state, void const *before_state) |
Definition at line 10 of file crv-state.h.
typedef void(* clean_checkpoint_state_f) (void *state) |
Definition at line 9 of file crv-state.h.
typedef struct crv_checkpointer crv_checkpointer |
typedef struct crv_lpstate_checkpoint_internal crv_lpstate_checkpoint_internal |
typedef void(* print_checkpoint_state_f) (FILE *, char const *prefix, void *state) |
Definition at line 12 of file crv-state.h.
typedef void(* print_event_f) (FILE *, char const *prefix, void *lp_state, void *event_msg) |
Definition at line 13 of file crv-state.h.
typedef void(* print_lpstate_f) (FILE *, char const *prefix, void *state) |
Definition at line 11 of file crv-state.h.
typedef void(* save_checkpoint_state_f) (void *into, void const *from) |
Definition at line 8 of file crv-state.h.
void crv_add_custom_state_checkpoint | ( | crv_checkpointer * | state_checkpoint | ) |
Definition at line 14 of file crv-state.c.
References head_linked_list, llist_chptr::next, tail_linked_list, tw_error(), TW_LOC, and llist_chptr::val.
Referenced by main().
void crv_check_lpstates | ( | tw_lp * | clp, |
tw_event * | cev, | ||
crv_lpstate_checkpoint_internal const * | before_state, | ||
char const * | before_msg, | ||
char const * | after_msg ) |
Definition at line 105 of file crv-state.c.
References crv_checkpointer::check_lps, crv_lpstate_checkpoint_internal::core_rng, tw_lp::core_rng, tw_lp::cur_state, get_chkpntr(), tw_lp::gid, tw_lp::id, crv_checkpointer::print_checkpoint, print_event(), crv_checkpointer::print_lp, crv_lpstate_checkpoint_internal::rng, tw_lp::rng, crv_lpstate_checkpoint_internal::state, tw_lptype::state_sz, crv_lpstate_checkpoint_internal::triggered_gvt_hook, tw_lp::triggered_gvt_hook, tw_fprint_binary_array(), tw_net_abort(), and tw_lp::type.
Referenced by tw_scheduler_sequential_rollback_check().
void crv_clean_lpstate | ( | crv_lpstate_checkpoint_internal * | state, |
tw_lp const * | clp ) |
Definition at line 189 of file crv-state.c.
References crv_checkpointer::clean_lp, get_chkpntr(), tw_lp::id, and crv_lpstate_checkpoint_internal::state.
Referenced by tw_scheduler_sequential_rollback_check().
void crv_copy_lpstate | ( | crv_lpstate_checkpoint_internal * | into, |
tw_lp const * | clp ) |
Definition at line 176 of file crv-state.c.
References crv_lpstate_checkpoint_internal::core_rng, tw_lp::core_rng, tw_lp::cur_state, get_chkpntr(), tw_lp::id, crv_lpstate_checkpoint_internal::rng, tw_lp::rng, crv_checkpointer::save_lp, crv_lpstate_checkpoint_internal::state, tw_lptype::state_sz, crv_lpstate_checkpoint_internal::triggered_gvt_hook, tw_lp::triggered_gvt_hook, and tw_lp::type.
Referenced by tw_scheduler_sequential_rollback_check().
size_t crv_init_checkpoints | ( | void | ) |
Definition at line 47 of file crv-state.c.
References checkpointer_for_lps, crv_clean_linkedlist(), g_tw_lp, g_tw_nlp, head_linked_list, crv_checkpointer::sz_storage, and tw_lp::type.
Referenced by tw_scheduler_sequential_rollback_check().