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

Public GIT Repository
Fix mailbox::clear() to properly finish Comms
[simgrid.git] / src / kernel / activity / ExecImpl.cpp
index d7e0986c0d9e5f8e70f665923d00240d6be51555..4b2ad5c7e4b98f1ff6398be1b7b37b4ff6705470 100644 (file)
@@ -17,9 +17,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_cpu, kernel, "Kernel cpu-related synchronization");
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 ExecImpl::ExecImpl()
 {
@@ -184,7 +182,7 @@ void ExecImpl::set_exception(actor::ActorImpl* issuer)
       if (issuer->get_host()->is_on())
         issuer->exception_ = std::make_exception_ptr(HostFailureException(XBT_THROW_POINT, "Host failed"));
       else /* else, the actor will be killed with no possibility to survive */
-        issuer->context_->set_wannadie();
+        issuer->set_wannadie();
       break;
 
     case State::CANCELED:
@@ -204,11 +202,11 @@ void ExecImpl::finish()
 {
   XBT_DEBUG("ExecImpl::finish() in state %s", get_state_str());
   while (not simcalls_.empty()) {
-    smx_simcall_t simcall = simcalls_.front();
+    actor::Simcall* simcall = simcalls_.front();
     simcalls_.pop_front();
 
-    if (simcall->call_ == simix::Simcall::NONE) // FIXME: maybe a better way to handle this case
-      continue;                                 // if process handling comm is killed
+    if (simcall->call_ == actor::Simcall::Type::NONE) // FIXME: maybe a better way to handle this case
+      continue;                                       // if process handling comm is killed
 
     handle_activity_waitany(simcall);
 
@@ -219,7 +217,7 @@ void ExecImpl::finish()
     if (simcall->issuer_->get_host()->is_on())
       simcall->issuer_->simcall_answer();
     else
-      simcall->issuer_->context_->set_wannadie();
+      simcall->issuer_->set_wannadie();
   }
 }
 
@@ -256,6 +254,4 @@ ActivityImpl* ExecImpl::migrate(s4u::Host* to)
  *************/
 xbt::signal<void(ExecImpl const&, s4u::Host*)> ExecImpl::on_migration;
 
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity