X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c5ad8ca1a68bbaa9152471c8d0eeb99d762f0d86..599347b970dec2ad471021b8eecca62e8f0854e9:/src/simix/smx_host.c diff --git a/src/simix/smx_host.c b/src/simix/smx_host.c index e87041bc51..08b7ebec38 100644 --- a/src/simix/smx_host.c +++ b/src/simix/smx_host.c @@ -299,7 +299,7 @@ void SIMIX_pre_host_execution_wait(smx_simcall_t simcall) { 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); @@ -331,7 +331,7 @@ void SIMIX_host_execution_resume(smx_action_t action) 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) { @@ -345,27 +345,17 @@ void SIMIX_execution_finish(smx_action_t action) 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;