Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allow python actors to be killed
[simgrid.git] / src / simix / ActorImpl.cpp
index 4d494cd..4b16464 100644 (file)
@@ -34,7 +34,7 @@ unsigned long simix_process_maxpid = 0;
  */
 smx_actor_t SIMIX_process_self()
 {
-  smx_context_t self_context = SIMIX_context_self();
+  smx_context_t self_context = simgrid::kernel::context::Context::self();
 
   return (self_context != nullptr) ? self_context->process() : nullptr;
 }
@@ -429,7 +429,7 @@ smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostn
 
 void SIMIX_process_detach()
 {
-  auto* context = dynamic_cast<simgrid::kernel::context::AttachContext*>(SIMIX_context_self());
+  auto* context = dynamic_cast<simgrid::kernel::context::AttachContext*>(simgrid::kernel::context::Context::self());
   if (context == nullptr)
     xbt_die("Not a suitable context");
 
@@ -504,7 +504,7 @@ void SIMIX_process_kill(smx_actor_t actor, smx_actor_t issuer)
      */
 
     if (simgrid::kernel::context::factory_initializer == nullptr) // Only Java sets a factory_initializer, for now
-      actor->throw_exception(std::make_exception_ptr(simgrid::kernel::context::Context::StopRequest("Host failed")));
+      actor->throw_exception(std::make_exception_ptr(simgrid::kernel::context::Context::StopRequest("host failed")));
   }
 
   /* destroy the blocking synchro if any */