-
- e_smx_state_t result;
- switch (surf_sleep->get_state()) {
- case simgrid::kernel::resource::Action::State::FAILED:
- simcall->issuer->context->iwannadie = 1;
- result = SIMIX_SRC_HOST_FAILURE;
- break;
-
- case simgrid::kernel::resource::Action::State::FINISHED:
- result = SIMIX_DONE;
- break;
-
- default:
- THROW_IMPOSSIBLE;
- break;
+ if (state_ == SIMIX_SRC_HOST_FAILURE) {
+ /* If the host running the synchro failed, notice it. This way, the asking
+ * actor can be killed if it runs on that host itself */
+ simcall->issuer->context_->iwannadie = true;
+ simcall->issuer->exception_ = std::make_exception_ptr(HostFailureException(XBT_THROW_POINT, "Host failed"));