Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics (less SIMIX, more kernel)
[simgrid.git] / src / kernel / activity / SleepImpl.cpp
index 09f5e1408c98e96e1b732b0547b35fdd60e4a7b7..8a3eb1858890bbcf48c72f6ceee3b6a34ea74a46 100644 (file)
@@ -42,12 +42,13 @@ void SleepImpl::post()
 {
   if (surf_action_->get_state() == resource::Action::State::FAILED) {
     if (host_ && not host_->is_on())
-      state_ = SIMIX_SRC_HOST_FAILURE;
+      state_ = State::SRC_HOST_FAILURE;
     else
-      state_ = SIMIX_CANCELED;
+      state_ = State::CANCELED;
   } else if (surf_action_->get_state() == resource::Action::State::FINISHED) {
-    state_ = SIMIX_DONE;
+    state_ = State::DONE;
   }
+  /* Answer all simcalls associated with the synchro */
   finish();
 }
 
@@ -61,7 +62,7 @@ void SleepImpl::finish()
     if (simcall->issuer_->is_suspended()) {
       XBT_DEBUG("Wait! This process is suspended and can't wake up now.");
       simcall->issuer_->suspended_ = false;
-      simcall->issuer_->suspend(simcall->issuer_);
+      simcall->issuer_->suspend();
     } else {
       simcall->issuer_->simcall_answer();
     }