- switch (synchro->state) {
-
- case SIMIX_DONE:
- XBT_DEBUG("Communication %p complete!", synchro);
- SIMIX_comm_copy_data(synchro);
- break;
-
- case SIMIX_SRC_TIMEOUT:
- SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of sender");
- break;
-
- case SIMIX_DST_TIMEOUT:
- SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of receiver");
- break;
-
- case SIMIX_SRC_HOST_FAILURE:
- if (simcall->issuer == comm->src_proc)
- simcall->issuer->context->iwannadie = 1;
- // SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
- else
- SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
- break;
-
- case SIMIX_DST_HOST_FAILURE:
- if (simcall->issuer == comm->dst_proc)
- simcall->issuer->context->iwannadie = 1;
- // SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
- else
- SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
- break;
-
- case SIMIX_LINK_FAILURE:
-
- XBT_DEBUG(
- "Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) detached:%d",
- synchro, comm->src_proc ? comm->src_proc->host->cname() : nullptr,
- comm->dst_proc ? comm->dst_proc->host->cname() : nullptr, simcall->issuer->cname(), simcall->issuer,
- comm->detached);
- if (comm->src_proc == simcall->issuer) {
- XBT_DEBUG("I'm source");
- } else if (comm->dst_proc == simcall->issuer) {
- XBT_DEBUG("I'm dest");
- } else {
- XBT_DEBUG("I'm neither source nor dest");
- }
- SMX_EXCEPTION(simcall->issuer, network_error, 0, "Link failure");
- break;
-
- case SIMIX_CANCELED:
- if (simcall->issuer == comm->dst_proc)
- SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Communication canceled by the sender");
- else
- SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Communication canceled by the receiver");
- break;
-
- default:
- xbt_die("Unexpected synchro state in SIMIX_comm_finish: %d", (int)synchro->state);
+ switch (comm->state) {
+
+ case SIMIX_DONE:
+ XBT_DEBUG("Communication %p complete!", synchro.get());
+ SIMIX_comm_copy_data(synchro);
+ break;
+
+ case SIMIX_SRC_TIMEOUT:
+ SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of sender");
+ break;
+
+ case SIMIX_DST_TIMEOUT:
+ SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of receiver");
+ break;
+
+ case SIMIX_SRC_HOST_FAILURE:
+ if (simcall->issuer == comm->src_proc)
+ simcall->issuer->context->iwannadie = 1;
+ else
+ SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
+ break;
+
+ case SIMIX_DST_HOST_FAILURE:
+ if (simcall->issuer == comm->dst_proc)
+ simcall->issuer->context->iwannadie = 1;
+ else
+ SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
+ break;
+
+ case SIMIX_LINK_FAILURE:
+ XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) "
+ "detached:%d",
+ synchro.get(), comm->src_proc ? comm->src_proc->host->get_cname() : nullptr,
+ comm->dst_proc ? comm->dst_proc->host->get_cname() : nullptr, simcall->issuer->get_cname(),
+ simcall->issuer, comm->detached);
+ if (comm->src_proc == simcall->issuer) {
+ XBT_DEBUG("I'm source");
+ } else if (comm->dst_proc == simcall->issuer) {
+ XBT_DEBUG("I'm dest");
+ } else {
+ XBT_DEBUG("I'm neither source nor dest");
+ }
+ SMX_EXCEPTION(simcall->issuer, network_error, 0, "Link failure");
+ break;
+
+ case SIMIX_CANCELED:
+ if (simcall->issuer == comm->dst_proc)
+ SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Communication canceled by the sender");
+ else
+ SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Communication canceled by the receiver");
+ break;
+
+ default:
+ xbt_die("Unexpected synchro state in SIMIX_comm_finish: %d", (int)synchro->state);