Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Pass large parameter by address.
[simgrid.git] / src / simix / smx_deployment.cpp
index 1955bf7..17b354c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -64,7 +64,7 @@ void SIMIX_process_set_function(const char* process_host, const char* process_fu
 {
   simgrid::kernel::routing::ActorCreationArgs actor;
 
-  sg_host_t host = sg_host_by_name(process_host);
+  const simgrid::s4u::Host* host = sg_host_by_name(process_host);
   if (not host)
     throw std::invalid_argument(simgrid::xbt::string_printf("Host '%s' unknown", process_host));
   actor.host = process_host;
@@ -77,14 +77,14 @@ void SIMIX_process_set_function(const char* process_host, const char* process_fu
   }
 
   // Check we know how to handle this function name:
-  simgrid::simix::ActorCodeFactory& parse_code = SIMIX_get_actor_code_factory(process_function);
+  const simgrid::simix::ActorCodeFactory& parse_code = SIMIX_get_actor_code_factory(process_function);
   xbt_assert(parse_code, "Function '%s' unknown", process_function);
 
-  actor.function   = process_function;
-  actor.host       = process_host;
-  actor.kill_time  = process_kill_time;
-  actor.start_time = process_start_time;
-  actor.on_failure = simgrid::kernel::routing::ActorOnFailure::DIE;
+  actor.function           = process_function;
+  actor.host               = process_host;
+  actor.kill_time          = process_kill_time;
+  actor.start_time         = process_start_time;
+  actor.restart_on_failure = false;
   sg_platf_new_actor(&actor);
 }