Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Use unsigned char* for context stacks.
[simgrid.git] / src / simix / ActorImpl.cpp
index bcbe884..9268dd4 100644 (file)
@@ -15,7 +15,6 @@
 #include "src/kernel/activity/SynchroRaw.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/mc/remote/Client.hpp"
-#include "src/simix/smx_host_private.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/cpu_interface.hpp"
 
@@ -42,6 +41,7 @@ smx_actor_t SIMIX_process_self()
 /**
  * @brief Returns whether a process has pending asynchronous communications.
  * @return true if there are asynchronous communications in this process
+ * @deprecated
  */
 int SIMIX_process_has_pending_comms(smx_actor_t process) {
 
@@ -164,7 +164,7 @@ void ActorImpl::exit()
 
   // Forcefully kill the actor if its host is turned off. Not a HostFailureException because you should not survive that
   if (not host_->is_on())
-    this->throw_exception(std::make_exception_ptr(simgrid::kernel::context::ForcefulKillException("host failed")));
+    this->throw_exception(std::make_exception_ptr(ForcefulKillException("host failed")));
 
   /* destroy the blocking synchro if any */
   if (waiting_synchro != nullptr) {
@@ -344,7 +344,7 @@ activity::ActivityImplPtr ActorImpl::suspend(ActorImpl* issuer)
 
     return nullptr;
   } else {
-    return activity::ExecImplPtr(new activity::ExecImpl("suspend", "", this->host_))->start(0.0, 1.0, 0.0);
+    return activity::ExecImplPtr(new activity::ExecImpl("suspend", ""))->set_host(host_)->start(0.0, 1.0, 0.0);
   }
 }
 
@@ -596,7 +596,7 @@ int SIMIX_process_count()
   return simix_global->process_list.size();
 }
 
-void* SIMIX_process_self_get_data()
+void* SIMIX_process_self_get_data() // deprecated
 {
   smx_actor_t self = SIMIX_process_self();
 
@@ -606,7 +606,7 @@ void* SIMIX_process_self_get_data()
   return self->get_user_data();
 }
 
-void SIMIX_process_self_set_data(void *data)
+void SIMIX_process_self_set_data(void* data) // deprecated
 {
   SIMIX_process_self()->set_user_data(data);
 }
@@ -689,7 +689,7 @@ void SIMIX_process_on_exit(smx_actor_t actor, int_f_pvoid_pvoid_t fun, void* dat
   SIMIX_process_on_exit(actor, [fun](int a, void* b) { fun((void*)(intptr_t)a, b); }, data);
 }
 
-void SIMIX_process_on_exit(smx_actor_t actor, std::function<void(int, void*)> fun, void* data)
+void SIMIX_process_on_exit(smx_actor_t actor, std::function<void(bool, void*)> fun, void* data)
 {
   xbt_assert(actor, "current process not found: are you in maestro context ?");