- default:
- THROW_IMPOSSIBLE;
- break;
- }
- if (simcall->issuer->host->is_off()) {
- simcall->issuer->context->iwannadie = 1;
- }
- simcall_process_sleep__set__result(simcall, result);
- simcall->issuer->waiting_synchro = nullptr;
- if (simcall->issuer->suspended) {
+void SleepImpl::finish()
+{
+ XBT_DEBUG("SleepImpl::finish() in state %s", to_c_str(state_));
+ while (not simcalls_.empty()) {
+ const s_smx_simcall* simcall = simcalls_.front();
+ simcalls_.pop_front();
+
+ simcall->issuer_->waiting_synchro_ = nullptr;
+ if (simcall->issuer_->is_suspended()) {