Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : break forgotten in switch
[simgrid.git] / src / msg / msg_global.c
index 7ac93dd..404d8bf 100644 (file)
@@ -67,6 +67,7 @@ void MSG_global_init(int *argc, char **argv)
     msg_global->max_channel = 0;
     msg_global->PID = 1;
     msg_global->sent_msg = 0;
+    msg_global->task_copy_callback = NULL;
 
     /* initialization of the action module */
     _MSG_action_init();
@@ -74,6 +75,7 @@ void MSG_global_init(int *argc, char **argv)
     SIMIX_function_register_process_create(MSG_process_create_from_SIMIX);
     SIMIX_function_register_process_cleanup(MSG_process_cleanup_from_SIMIX);
     SIMIX_function_register_process_kill(MSG_process_kill_from_SIMIX);
+    SIMIX_comm_set_copy_data_callback(MSG_comm_copy_data_from_SIMIX);
   }
 #ifdef HAVE_TRACING
   TRACE_start();
@@ -153,6 +155,37 @@ MSG_error_t MSG_main(void)
   return MSG_OK;
 }
 
+MSG_error_t MSG_main_stateful(void)
+{
+  /* Clean IO before the run */
+  fflush(stdout);
+  fflush(stderr);
+
+  if (MC_IS_ENABLED) {
+    MC_modelcheck_stateful();
+  }
+  else {
+    SIMIX_run();
+  }
+  return MSG_OK;
+}
+
+
+MSG_error_t MSG_main_liveness(xbt_automaton_t a, char *prgm)
+{
+  /* Clean IO before the run */
+  fflush(stdout);
+  fflush(stderr);
+
+  if (MC_IS_ENABLED) {
+    MC_modelcheck_liveness(a, prgm);
+  }
+  else {
+    SIMIX_run();
+  }
+  return MSG_OK;
+}
+
 /** \ingroup msg_simulation
  * \brief Kill all running process