double flops_amount, double priority, double bound, unsigned long affinity_mask){
/* alloc structures and initialize */
- simgrid::simix::Exec *exec = new simgrid::simix::Exec();
- exec->name = xbt_strdup(name);
- exec->state = SIMIX_RUNNING;
- exec->host = issuer->host;
+ simgrid::simix::Exec *exec = new simgrid::simix::Exec(name, issuer->host);
/* set surf's action */
if (!MC_is_active() && !MC_record_replay_is_active()) {
}
}
- XBT_DEBUG("Create execute synchro %p: %s", exec, exec->name);
+ XBT_DEBUG("Create execute synchro %p: %s", exec, exec->name.c_str());
return exec;
}
int i;
/* alloc structures and initialize */
- simgrid::simix::Exec *exec = new simgrid::simix::Exec();
- exec->name = xbt_strdup(name);
- exec->state = SIMIX_RUNNING;
- exec->host = nullptr; /* FIXME: do we need the list of hosts? */
+ simgrid::simix::Exec *exec = new simgrid::simix::Exec(name, nullptr);
/* set surf's synchro */
host_list_cpy = xbt_new0(sg_host_t, host_nb);
XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro, (int)synchro->state);
/* Associate this simcall to the synchro */
- xbt_fifo_push(synchro->simcalls, simcall);
+ synchro->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
/* set surf's synchro */
void SIMIX_execution_finish(simgrid::simix::Exec *exec)
{
- xbt_fifo_item_t item;
- smx_simcall_t simcall;
-
- xbt_fifo_foreach(exec->simcalls, item, simcall, smx_simcall_t) {
-
+ for (smx_simcall_t simcall : exec->simcalls) {
switch (exec->state) {
case SIMIX_DONE: