X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3ca5d58e75df5f28588be1953f6b84a79b163d3b..96920215fe6b67ec41f9e9dee856b5157a67f6d2:/src/simix/smx_network.c diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index f3798e69a8..eade5755b3 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -175,7 +175,7 @@ int SIMIX_comm_has_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), voi } } XBT_DEBUG("No matching communication action found"); - return 1; + return 0; } /** @@ -196,7 +196,7 @@ int SIMIX_comm_has_recv_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), voi } } XBT_DEBUG("No matching communication action found"); - return 1; + return 0; } /******************************************************************************/ @@ -585,7 +585,7 @@ void SIMIX_comm_finish(smx_action_t action) case SIMIX_SRC_TIMEOUT: TRY { - THROW0(timeout_error, 0, "Communication timeouted because of sender"); + THROWF(timeout_error, 0, "Communication timeouted because of sender"); } CATCH(req->issuer->running_ctx->exception) { req->issuer->doexception = 1; @@ -594,7 +594,7 @@ void SIMIX_comm_finish(smx_action_t action) case SIMIX_DST_TIMEOUT: TRY { - THROW0(timeout_error, 0, "Communication timeouted because of receiver"); + THROWF(timeout_error, 0, "Communication timeouted because of receiver"); } CATCH(req->issuer->running_ctx->exception) { req->issuer->doexception = 1; @@ -604,9 +604,9 @@ void SIMIX_comm_finish(smx_action_t action) case SIMIX_SRC_HOST_FAILURE: TRY { if (req->issuer == action->comm.src_proc) - THROW0(host_error, 0, "Host failed"); + THROWF(host_error, 0, "Host failed"); else - THROW0(network_error, 0, "Remote peer failed"); + THROWF(network_error, 0, "Remote peer failed"); } CATCH(req->issuer->running_ctx->exception) { req->issuer->doexception = 1; @@ -616,9 +616,9 @@ void SIMIX_comm_finish(smx_action_t action) case SIMIX_DST_HOST_FAILURE: TRY { if (req->issuer == action->comm.dst_proc) - THROW0(host_error, 0, "Host failed"); + THROWF(host_error, 0, "Host failed"); else - THROW0(network_error, 0, "Remote peer failed"); + THROWF(network_error, 0, "Remote peer failed"); } CATCH(req->issuer->running_ctx->exception) { req->issuer->doexception = 1; @@ -630,7 +630,7 @@ void SIMIX_comm_finish(smx_action_t action) XBT_DEBUG("Link failure in action %p between '%s' and '%s': posting an exception to the issuer: %s (%p)", action, action->comm.src_proc->smx_host->name, action->comm.dst_proc->smx_host->name, req->issuer->name, req->issuer); - THROW0(network_error, 0, "Link failure"); + THROWF(network_error, 0, "Link failure"); } CATCH(req->issuer->running_ctx->exception) { req->issuer->doexception = 1; @@ -812,7 +812,7 @@ SIMIX_comm_set_copy_data_callback(void (*callback) (smx_action_t, size_t)) void SIMIX_comm_copy_pointer_callback(smx_action_t comm, size_t buff_size) { - xbt_assert1((buff_size == sizeof(void *)), + xbt_assert((buff_size == sizeof(void *)), "Cannot copy %zu bytes: must be sizeof(void*)", buff_size); *(void **) (comm->comm.dst_buff) = comm->comm.src_buff; }