Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further reduce the amount of includes
[simgrid.git] / src / simix / ActorImpl.hpp
index 9719f32..4bb1dcf 100644 (file)
@@ -6,18 +6,10 @@
 #ifndef _SIMIX_ACTORIMPL_H
 #define _SIMIX_ACTORIMPL_H
 
-#include <atomic>
-#include <functional>
-#include <string>
-
-#include <xbt/base.h>
-#include <xbt/string.hpp>
-
-#include <simgrid/simix.hpp>
-#include <simgrid/s4u/Actor.hpp>
-
-#include "simgrid/simix.h"
-#include "popping_private.h"
+#include "simgrid/s4u/Actor.hpp"
+#include "src/simix/popping_private.h"
+#include "xbt/fifo.h"
+#include "xbt/swag.h"
 
 typedef struct s_smx_process_exit_fun {
   int_f_pvoid_pvoid_t fun;
@@ -32,7 +24,7 @@ public:
   std::string name;
   std::function<void()> code;
   void *data            = nullptr;
-  const char *hostname  = nullptr;
+  sg_host_t host        = nullptr;
   double kill_time      = 0.0;
   xbt_dict_t properties = nullptr;
   bool auto_restart     = false;
@@ -51,6 +43,7 @@ public:
   unsigned long pid  = 0;
   unsigned long ppid = 0;
   simgrid::xbt::string name;
+  const char* cname() { return name.c_str(); }
   sg_host_t host        = nullptr; /* the host on which the process is running */
   smx_context_t context = nullptr; /* the context (uctx/raw/thread) that executes the user function */
 
@@ -110,7 +103,7 @@ XBT_PRIVATE smx_actor_t SIMIX_process_create(
                           const char *name,
                           std::function<void()> code,
                           void *data,
-                          const char *hostname,
+                          sg_host_t host,
                           double kill_time,
                           xbt_dict_t properties,
                           int auto_restart,
@@ -126,7 +119,7 @@ XBT_PRIVATE void SIMIX_process_yield(smx_actor_t self);
 XBT_PRIVATE void SIMIX_process_exception_terminate(xbt_ex_t * e);
 XBT_PRIVATE void SIMIX_process_change_host(smx_actor_t process, sg_host_t dest);
 XBT_PRIVATE smx_activity_t SIMIX_process_suspend(smx_actor_t process, smx_actor_t issuer);
-XBT_PRIVATE void SIMIX_process_resume(smx_actor_t process, smx_actor_t issuer);
+XBT_PRIVATE void SIMIX_process_resume(smx_actor_t process);
 XBT_PRIVATE int SIMIX_process_get_PID(smx_actor_t self);
 XBT_PRIVATE void* SIMIX_process_get_data(smx_actor_t process);
 XBT_PRIVATE void SIMIX_process_set_data(smx_actor_t process, void *data);