/* 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. */
+#include <simgrid/s4u/host.hpp>
+
#include "src/simix/SynchroExec.hpp"
#include "src/surf/surf_interface.hpp"
#include "src/simix/smx_host_private.h"
+simgrid::simix::Exec::Exec(const char*name, sg_host_t hostarg)
+{
+ if (name)
+ this->name = name;
+ this->state = SIMIX_RUNNING;
+ this->host = hostarg;
+}
+
simgrid::simix::Exec::~Exec()
{
if (surf_exec)
if (surf_exec) {
surf_exec->unref();
- surf_exec = NULL;
+ surf_exec = nullptr;
}
/* If there are simcalls associated with the synchro, then answer them */
- if (xbt_fifo_size(simcalls))
+ if (!simcalls.empty())
SIMIX_execution_finish(this);
}