*/
XBT_PUBLIC_DATA(s_surf_model_description_t) surf_vm_model_description[];
-/** \ingroup SURF_simulation
- * \brief List of hosts that have just restarted and whose autorestart process should be restarted.
- */
-XBT_PUBLIC_DATA(xbt_dynar_t) host_that_restart;
-
/** \ingroup SURF_simulation
* \brief List of hosts for which one want to be notified if they ever restart.
*/
} while (again);
/* Autorestart all process */
- char *hostname = nullptr;
- unsigned int iter;
- xbt_dynar_foreach(host_that_restart,iter,hostname) {
- XBT_INFO("Restart processes on host: %s",hostname);
- SIMIX_host_autorestart(sg_host_by_name(hostname));
+ for (auto hostname: host_that_restart) {
+ XBT_INFO("Restart processes on host: %s", hostname.c_str());
+ SIMIX_host_autorestart(sg_host_by_name(hostname.c_str()));
}
- xbt_dynar_reset(host_that_restart);
+ host_that_restart.clear();
/* Clean processes to destroy */
SIMIX_process_empty_trash();
if (value > 0) {
if(isOff())
- xbt_dynar_push_as(host_that_restart, char*, (char *)getName());
+ host_that_restart.push_back(getName());
turnOn();
} else {
lmm_constraint_t cnst = getConstraint();
} else if (event == stateEvent_) {
if (value > 0) {
if(isOff())
- xbt_dynar_push_as(host_that_restart, char*, (char *)getName());
+ host_that_restart.push_back(getName());
turnOn();
} else {
turnOff();
#include "virtual_machine.hpp"
#include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
#include "simgrid/s4u/engine.hpp"
+#include <vector>
XBT_LOG_NEW_CATEGORY(surf, "All SURF categories");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf, "Logging specific to SURF (kernel)");
simgrid::trace_mgr::future_evt_set *future_evt_set = nullptr;
xbt_dynar_t surf_path = nullptr;
-xbt_dynar_t host_that_restart = xbt_dynar_new(sizeof(char*), nullptr);
+std::vector<std::string> host_that_restart;
xbt_dict_t watched_hosts_lib;
namespace simgrid {
sg_config_finalize();
- xbt_dynar_free(&host_that_restart);
xbt_dynar_free(&surf_path);
xbt_dict_free(&host_list);
extern "C" {
XBT_PUBLIC(double) surf_get_clock(void);
}
+/** \ingroup SURF_simulation
+ * \brief List of hosts that have just restarted and whose autorestart process should be restarted.
+ */
+XBT_PUBLIC_DATA(std::vector<std::string>) host_that_restart;
+
extern XBT_PRIVATE double sg_sender_gap;