X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/48efae676c3604efffe21365b2d525e578fd22e5..d07e7725e5403b21d0cfab0a8fea8a1f30fcc8bf:/src/simix/SynchroExec.cpp diff --git a/src/simix/SynchroExec.cpp b/src/simix/SynchroExec.cpp index 3b0f2c84b2..9f08b4ba28 100644 --- a/src/simix/SynchroExec.cpp +++ b/src/simix/SynchroExec.cpp @@ -3,10 +3,20 @@ /* 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 + #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) @@ -47,10 +57,10 @@ void simgrid::simix::Exec::post() 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); }