action->execution.surf_exec =
surf_workstation_model->extension.workstation.
execute_parallel_task(host_nb, workstation_list, computation_amount,
- communication_amount, amount, rate);
+ communication_amount, rate);
surf_workstation_model->action_data_set(action->execution.surf_exec, action);
}
{
smx_action_t action = simcall->host_execution_wait.execution;
- XBT_DEBUG("Wait for execution of action %p, state %d", action, action->state);
+ XBT_DEBUG("Wait for execution of action %p, state %d", action, (int)action->state);
/* Associate this simcall to the action */
xbt_fifo_push(action->simcalls, simcall);
void SIMIX_host_execution_resume(smx_action_t action)
{
if(action->execution.surf_exec)
- surf_workstation_model->suspend(action->execution.surf_exec);
+ surf_workstation_model->resume(action->execution.surf_exec);
}
void SIMIX_execution_finish(smx_action_t action)
{
- volatile xbt_fifo_item_t item;
+ xbt_fifo_item_t item;
smx_simcall_t simcall;
xbt_fifo_foreach(action->simcalls, item, simcall, smx_simcall_t) {
case SIMIX_FAILED:
XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", simcall->issuer->smx_host->name);
- TRY {
- THROWF(host_error, 0, "Host failed");
- }
- CATCH(simcall->issuer->running_ctx->exception) {
- simcall->issuer->doexception = 1;
- }
- break;
+ SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
+ break;
case SIMIX_CANCELED:
XBT_DEBUG("SIMIX_execution_finished: execution canceled");
- TRY {
- THROWF(cancel_error, 0, "Canceled");
- }
- CATCH(simcall->issuer->running_ctx->exception) {
- simcall->issuer->doexception = 1;
- }
- break;
+ SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Canceled");
+ break;
default:
xbt_die("Internal error in SIMIX_execution_finish: unexpected action state %d",
- action->state);
+ (int)action->state);
}
simcall->issuer->waiting_action = NULL;
simcall->host_execution_wait.result = action->state;