]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/activity/SemaphoreImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use the "_t" and "_v" version of type traits.
[simgrid.git] / src / kernel / activity / SemaphoreImpl.cpp
index 2bb639663db6585284219ca53f775bcc767fad3f..8cba364a5d313ae2427a4c6b4af6b118c9cb34f3 100644 (file)
@@ -29,7 +29,7 @@ void SemAcquisitionImpl::wait_for(actor::ActorImpl* issuer, double timeout)
   this->register_simcall(&issuer_->simcall_); // Block on that acquisition
 
   if (granted_) {
-    post();
+    finish();
   } else if (timeout > 0) {
     model_action_ = get_issuer()->get_host()->get_cpu()->sleep(timeout);
     model_action_->set_activity(this);
@@ -38,10 +38,6 @@ void SemAcquisitionImpl::wait_for(actor::ActorImpl* issuer, double timeout)
     // Already in the queue
   }
 }
-void SemAcquisitionImpl::post()
-{
-  finish();
-}
 void SemAcquisitionImpl::finish()
 {
   xbt_assert(simcalls_.size() == 1, "Unexpected number of simcalls waiting: %zu", simcalls_.size());
@@ -108,7 +104,7 @@ void SemaphoreImpl::release()
 
     acqui->granted_ = true;
     if (acqui == acqui->get_issuer()->waiting_synchro_)
-      acqui->post();
+      acqui->finish();
     // else, the issuer is not blocked on this acquisition so no need to release it
 
   } else {