-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2018. 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. */
public:
std::string name;
std::function<void()> code;
- void *data = nullptr;
- sg_host_t host = nullptr;
+ void* data = nullptr;
+ s4u::Host* host = nullptr;
double kill_time = 0.0;
std::shared_ptr<std::map<std::string, std::string>> properties;
bool auto_restart = false;
+ ProcessArg() = default;
+ explicit ProcessArg(std::string name, std::function<void()> code, void* data, s4u::Host* host, double kill_time,
+ std::shared_ptr<std::map<std::string, std::string>> properties, bool auto_restart)
+ : name(name)
+ , code(std::move(code))
+ , data(data)
+ , host(host)
+ , kill_time(kill_time)
+ , properties(properties)
+ , auto_restart(auto_restart)
+ {
+ }
};
class ActorImpl : public simgrid::surf::PropertyHolder {
bool suspended = false;
bool auto_restart = false;
- sg_host_t new_host = nullptr; /* if not null, the host on which the process must migrate to */
smx_activity_t waiting_synchro = nullptr; /* the current blocking synchro if any */
std::list<smx_activity_t> comms; /* the current non-blocking communication synchros */
s_smx_simcall_t simcall;
std::function<void()> code;
smx_timer_t kill_timer = nullptr;
- int segment_index = -1; /* Reference to an SMPI process' data segment. Default value is -1 if not in SMPI context*/
/* Refcounting */
private:
}
}
-typedef simgrid::simix::ProcessArg *smx_process_arg_t;
-
typedef simgrid::simix::ActorImpl* smx_actor_t;
extern "C" {
XBT_PRIVATE void SIMIX_process_cleanup(smx_actor_t arg);
XBT_PRIVATE void SIMIX_process_empty_trash();
XBT_PRIVATE void SIMIX_process_yield(smx_actor_t self);
-XBT_PRIVATE void SIMIX_process_exception_terminate(xbt_ex_t * e);
XBT_PRIVATE void SIMIX_process_change_host(smx_actor_t process, sg_host_t dest);
-XBT_PRIVATE void SIMIX_process_set_data(smx_actor_t process, void *data);
-XBT_PRIVATE smx_actor_t SIMIX_process_get_by_name(const char* name);
XBT_PRIVATE void SIMIX_process_auto_restart_set(smx_actor_t process, int auto_restart);