Exemple #1
0
static int is_exploration_stack_pair(simgrid::mc::VisitedPair* pair){
  xbt_fifo_item_t item = xbt_fifo_get_first_item(mc_stack);
  while (item) {
    if (((simgrid::mc::Pair*)xbt_fifo_get_item_content(item))->num == pair->num){
      ((simgrid::mc::Pair*)xbt_fifo_get_item_content(item))->visited_pair_removed = 1;
      return 1;
    }
    item = xbt_fifo_get_next_item(item);
  }
  return 0;
}
Exemple #2
0
static int is_exploration_stack_state(mc_state_t current_state) {

    xbt_fifo_item_t item;
    mc_state_t stack_state;
    for(item = xbt_fifo_get_first_item(mc_stack); item != nullptr; item = xbt_fifo_get_next_item(item)) {
        stack_state = (mc_state_t) xbt_fifo_get_item_content(item);
        if(snapshot_compare(stack_state, current_state) == 0) {
            XBT_INFO("Non-progressive cycle : state %d -> state %d", stack_state->num, current_state->num);
            return 1;
        }
    }
    return 0;
}