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);
}
double start_time = actor->start_time;
double kill_time = actor->kill_time;
- bool auto_restart = actor->on_failure != simgrid::kernel::routing::ActorOnFailure::DIE;
+ bool auto_restart = actor->restart_on_failure;
std::string actor_name = actor->args[0];
simgrid::simix::ActorCode code = factory(std::move(actor->args));
std::string element;
};
-enum class ActorOnFailure { DIE, RESTART }; // FIXME: move to a better namespace
-
class ActorCreationArgs {
public:
std::vector<std::string> args;
const char* function = nullptr;
double start_time = 0.0;
double kill_time = 0.0;
- ActorOnFailure on_failure;
+ bool restart_on_failure = false;
};
class ZoneCreationArgs {
switch (A_surfxml_actor_on___failure) {
case AU_surfxml_actor_on___failure:
case A_surfxml_actor_on___failure_DIE:
- actor.on_failure = simgrid::kernel::routing::ActorOnFailure::DIE;
+ actor.restart_on_failure = false;
break;
case A_surfxml_actor_on___failure_RESTART:
- actor.on_failure = simgrid::kernel::routing::ActorOnFailure::RESTART;
+ actor.restart_on_failure = true;
break;
default:
surf_parse_error("Invalid on failure behavior");