Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
useless cleanups
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 20 Jan 2019 00:11:12 +0000 (01:11 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 20 Jan 2019 00:11:12 +0000 (01:11 +0100)
src/simix/ActorImpl.cpp
src/simix/libsmx.cpp
src/simix/smx_global.cpp

index 06e64af..9f72900 100644 (file)
@@ -301,8 +301,6 @@ void create_maestro(simgrid::simix::ActorCode code)
   if (not code) {
     maestro->context_ = SIMIX_context_new(simgrid::simix::ActorCode(), nullptr, maestro);
   } else {
   if (not code) {
     maestro->context_ = SIMIX_context_new(simgrid::simix::ActorCode(), nullptr, maestro);
   } else {
-    if (not simix_global)
-      xbt_die("simix is not initialized, please call MSG_init first");
     maestro->context_ = simix_global->context_factory->create_maestro(code, maestro);
   }
 
     maestro->context_ = simix_global->context_factory->create_maestro(code, maestro);
   }
 
index ebfe0c5..7269508 100644 (file)
@@ -384,8 +384,9 @@ int simcall_comm_test(smx_activity_t comm)
  */
 smx_mutex_t simcall_mutex_init()
 {
  */
 smx_mutex_t simcall_mutex_init()
 {
-  if (not simix_global) {
-    fprintf(stderr,"You must run MSG_init before using MSG\n"); // We can't use xbt_die since we may get there before the initialization
+  if (simix_global == nullptr) {
+    fprintf(stderr, "You must initialize the SimGrid engine before using it\n"); // We can't use xbt_die since we may
+                                                                                 // get there before the initialization
     xbt_abort();
   }
   return simgrid::simix::simcall([] { return new simgrid::kernel::activity::MutexImpl(); });
     xbt_abort();
   }
   return simgrid::simix::simcall([] { return new simgrid::kernel::activity::MutexImpl(); });
index 4c53ae6..b777616 100644 (file)
@@ -179,7 +179,7 @@ void SIMIX_global_init(int *argc, char **argv)
   simgrid::mc::Client::initialize();
 #endif
 
   simgrid::mc::Client::initialize();
 #endif
 
-  if (not simix_global) {
+  if (simix_global == nullptr) {
     simix_global = std::unique_ptr<simgrid::simix::Global>(new simgrid::simix::Global());
     simix_global->maestro_process = nullptr;
 
     simix_global = std::unique_ptr<simgrid::simix::Global>(new simgrid::simix::Global());
     simix_global->maestro_process = nullptr;