#include "src/mc/mc_private.h"
#include "src/mc/mc_record.h"
#include "src/mc/mc_smx.h"
-#include "src/mc/mc_client.h"
+#include "src/mc/Client.hpp"
#include "src/mc/mc_exit.h"
using simgrid::mc::remote;
-extern "C" {
-
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_comm_determinism, mc,
"Logging specific to MC communication determinism detection");
+extern "C" {
+
/********** Global variables **********/
xbt_dynar_t initial_communications_pattern;
int i;
const int maxpid = MC_smx_get_maxpid();
- if (_sg_mc_visited > 0)
- simgrid::mc::visited_states = simgrid::xbt::newDeleteDynar<simgrid::mc::VisitedState>();
+ simgrid::mc::visited_states.clear();
// Create initial_communications_pattern elements:
initial_communications_pattern = xbt_dynar_new(sizeof(mc_list_comm_pattern_t), MC_list_comm_pattern_free_voidp);
char *req_str = nullptr;
int value;
- simgrid::mc::VisitedState* visited_state = nullptr;
+ std::unique_ptr<simgrid::mc::VisitedState> visited_state = nullptr;
smx_simcall_t req = nullptr;
mc_state_t state = nullptr, next_state = NULL;
visited_state = nullptr;
/* Check for deadlocks */
- if (MC_deadlock_check()) {
+ if (mc_model_checker->checkDeadlock()) {
MC_show_deadlock(nullptr);
return SIMGRID_MC_EXIT_DEADLOCK;
}
if (mc_mode == MC_MODE_CLIENT)
// This will move somehwere else:
- MC_client_handle_messages();
+ simgrid::mc::Client::get()->handleMessages();
/* Create exploration stack */
mc_stack = xbt_fifo_new();