Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
align namespaces on directories for kernel::activity
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 31 Jul 2016 09:30:51 +0000 (11:30 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 31 Jul 2016 09:30:51 +0000 (11:30 +0200)
36 files changed:
include/simgrid/forward.h
include/simgrid/s4u/Activity.hpp
include/simgrid/s4u/comm.hpp
src/kernel/activity/Synchro.cpp
src/kernel/activity/Synchro.h
src/kernel/activity/SynchroComm.cpp
src/kernel/activity/SynchroComm.hpp
src/kernel/activity/SynchroExec.cpp
src/kernel/activity/SynchroExec.hpp
src/kernel/activity/SynchroIo.cpp
src/kernel/activity/SynchroIo.hpp
src/kernel/activity/SynchroRaw.cpp
src/kernel/activity/SynchroRaw.hpp
src/kernel/activity/SynchroSleep.cpp
src/kernel/activity/SynchroSleep.hpp
src/mc/CommunicationDeterminismChecker.cpp
src/mc/CommunicationDeterminismChecker.hpp
src/mc/mc_base.cpp
src/mc/mc_comm_pattern.cpp
src/mc/mc_request.cpp
src/mc/mc_state.cpp
src/mc/mc_state.h
src/msg/msg_gos.cpp
src/msg/msg_mailbox.cpp
src/msg/msg_private.h
src/msg/msg_task.cpp
src/simix/libsmx.cpp
src/simix/smx_global.cpp
src/simix/smx_host.cpp
src/simix/smx_host_private.h
src/simix/smx_io.cpp
src/simix/smx_network.cpp
src/simix/smx_process.cpp
src/simix/smx_synchro.cpp
src/smpi/smpi_base.cpp
src/smpi/smpi_global.cpp

index a4ef9bd..ddf9531 100644 (file)
@@ -15,8 +15,10 @@ namespace simgrid {
     class Host;
     class Mailbox;
   }
-  namespace simix {
-    class Synchro;
+  namespace kernel {
+     namespace activity {
+       class Synchro;
+     }
   }
   namespace surf {
     class Resource;
@@ -35,7 +37,7 @@ namespace simgrid {
 typedef simgrid::s4u::As simgrid_As;
 typedef simgrid::s4u::Host simgrid_Host;
 typedef simgrid::s4u::Mailbox simgrid_Mailbox;
-typedef simgrid::simix::Synchro simix_Synchro;
+typedef simgrid::kernel::activity::Synchro simgrid_Synchro;
 typedef simgrid::surf::Cpu surf_Cpu;
 typedef simgrid::routing::NetCard routing_NetCard;
 typedef simgrid::surf::Link Link;
@@ -47,7 +49,7 @@ typedef simgrid::trace_mgr::trace tmgr_Trace;
 typedef struct simgrid_As   simgrid_As;
 typedef struct simgrid_Host simgrid_Host;
 typedef struct simgrid_Mailbox simgrid_Mailbox;
-typedef struct simix_Synchro simix_Synchro;
+typedef struct simgrid_Synchro simgrid_Synchro;
 typedef struct surf_Cpu surf_Cpu;
 typedef struct routing_NetCard routing_NetCard;
 typedef struct surf_Resource surf_Resource;
@@ -59,7 +61,7 @@ typedef simgrid_As *AS_t;
 typedef simgrid_Host* sg_host_t;
 typedef simgrid_Mailbox* sg_mbox_t;
 
-typedef simix_Synchro *smx_synchro_t;
+typedef simgrid_Synchro *smx_synchro_t;
 
 typedef surf_Cpu *surf_cpu_t;
 typedef routing_NetCard *sg_netcard_t;
index 0b8d303..ac26e09 100644 (file)
@@ -66,7 +66,7 @@ public:
   void *getUserData() { return userData_; }
 
 private:
-  simgrid::simix::Synchro *pimpl_ = nullptr;
+  simgrid::kernel::activity::Synchro *pimpl_ = nullptr;
   e_s4u_activity_state_t state_ = inited;
   double remains_ = 0;
   void *userData_ = nullptr;
index e1046aa..ecb1e09 100644 (file)
@@ -34,13 +34,13 @@ public:
   I wait_any(I first, I last)
   {
     // Map to dynar<Synchro*>:
-    xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::simix::Synchro*), NULL);
+    xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::Synchro*), NULL);
     for(I iter = first; iter != last; iter++) {
       Comm& comm = **iter;
       if (comm.state_ == inited)
         comm.start();
       xbt_assert(comm.state_ == started);
-      xbt_dynar_push_as(comms, simgrid::simix::Synchro*, comm.pimpl_);
+      xbt_dynar_push_as(comms, simgrid::kernel::activity::Synchro*, comm.pimpl_);
     }
     // Call the underlying simcall:
     int idx = simcall_comm_waitany(comms, -1);
@@ -58,13 +58,13 @@ public:
   I wait_any_for(I first, I last, double timeout)
   {
     // Map to dynar<Synchro*>:
-    xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::simix::Synchro*), NULL);
+    xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::Synchro*), NULL);
     for(I iter = first; iter != last; iter++) {
       Comm& comm = **iter;
       if (comm.state_ == inited)
         comm.start();
       xbt_assert(comm.state_ == started);
-      xbt_dynar_push_as(comms, simgrid::simix::Synchro*, comm.pimpl_);
+      xbt_dynar_push_as(comms, simgrid::kernel::activity::Synchro*, comm.pimpl_);
     }
     // Call the underlying simcall:
     int idx = simcall_comm_waitany(comms, timeout);
index da79e88..cbe5cd3 100644 (file)
@@ -5,20 +5,20 @@
 
 #include "src/kernel/activity/Synchro.h"
 
-simgrid::simix::Synchro::Synchro()
+simgrid::kernel::activity::Synchro::Synchro()
 {
 }
 
-simgrid::simix::Synchro::~Synchro()
+simgrid::kernel::activity::Synchro::~Synchro()
 {
 }
 
-void simgrid::simix::Synchro::ref()
+void simgrid::kernel::activity::Synchro::ref()
 {
   refcount++;
 }
 
-void simgrid::simix::Synchro::unref()
+void simgrid::kernel::activity::Synchro::unref()
 {
   xbt_assert(refcount > 0,
       "This synchro has a negative refcount! You can only call test() or wait() once per synchronization.");
index 6421d5c..2146efb 100644 (file)
@@ -17,7 +17,8 @@
 #include <simgrid/simix.hpp>
 
 namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace activity {
 
   XBT_PUBLIC_CLASS Synchro {
   public:
@@ -36,7 +37,7 @@ namespace simix {
   private:
     int refcount = 1;
   };
-}} // namespace simgrid::simix
+}}} // namespace simgrid::kernel::activity
 #else /* not C++ */
 
 
index a0058b1..4367536 100644 (file)
@@ -11,7 +11,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_network);
 
-simgrid::simix::Comm::Comm(e_smx_comm_type_t _type) {
+simgrid::kernel::activity::Comm::Comm(e_smx_comm_type_t _type) {
   state = SIMIX_WAITING;
   this->type = _type;
   src_data=nullptr;
@@ -20,7 +20,7 @@ simgrid::simix::Comm::Comm(e_smx_comm_type_t _type) {
   XBT_DEBUG("Create communicate synchro %p", this);
 }
 
-simgrid::simix::Comm::~Comm()
+simgrid::kernel::activity::Comm::~Comm()
 {
   XBT_DEBUG("Really free communication %p", this);
 
@@ -38,7 +38,7 @@ simgrid::simix::Comm::~Comm()
     SIMIX_mbox_remove(mbox, this);
 
 }
-void simgrid::simix::Comm::suspend()
+void simgrid::kernel::activity::Comm::suspend()
 {
   /* FIXME: shall we suspend also the timeout synchro? */
   if (surf_comm)
@@ -47,7 +47,7 @@ void simgrid::simix::Comm::suspend()
 
 }
 
-void simgrid::simix::Comm::resume()
+void simgrid::kernel::activity::Comm::resume()
 {
   /*FIXME: check what happen with the timeouts */
   if (surf_comm)
@@ -55,7 +55,7 @@ void simgrid::simix::Comm::resume()
   /* in the other case, the synchro were not really suspended yet, see SIMIX_comm_suspend() and SIMIX_comm_start() */
 }
 
-void simgrid::simix::Comm::cancel()
+void simgrid::kernel::activity::Comm::cancel()
 {
   /* if the synchro is a waiting state means that it is still in a mbox */
   /* so remove from it and delete it */
@@ -72,7 +72,7 @@ void simgrid::simix::Comm::cancel()
 }
 
 /**  @brief get the amount remaining from the communication */
-double simgrid::simix::Comm::remains()
+double simgrid::kernel::activity::Comm::remains()
 {
   switch (state) {
 
@@ -92,7 +92,7 @@ double simgrid::simix::Comm::remains()
 }
 
 /** @brief This is part of the cleanup process, probably an internal command */
-void simgrid::simix::Comm::cleanupSurf()
+void simgrid::kernel::activity::Comm::cleanupSurf()
 {
   if (surf_comm){
     surf_comm->unref();
@@ -110,7 +110,7 @@ void simgrid::simix::Comm::cleanupSurf()
   }
 }
 
-void simgrid::simix::Comm::post()
+void simgrid::kernel::activity::Comm::post()
 {
   /* Update synchro state */
   if (src_timeout &&  src_timeout->getState() == simgrid::surf::Action::State::done)
index 264d598..608f0fa 100644 (file)
@@ -17,7 +17,8 @@ typedef enum {
 } e_smx_comm_type_t;
 
 namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace activity {
 
   XBT_PUBLIC_CLASS Comm : public Synchro {
     ~Comm() override;
@@ -66,6 +67,6 @@ namespace simix {
     void* dst_data = nullptr;
   };
 
-}} // namespace simgrid::simix
+}}} // namespace simgrid::kernel::activity
 
 #endif
index 6ec1d18..2617322 100644 (file)
@@ -9,7 +9,7 @@
 #include "src/surf/surf_interface.hpp"
 #include "src/simix/smx_host_private.h"
 
-simgrid::simix::Exec::Exec(const char*name, sg_host_t hostarg)
+simgrid::kernel::activity::Exec::Exec(const char*name, sg_host_t hostarg)
 {
   if (name)
     this->name = name;
@@ -17,24 +17,24 @@ simgrid::simix::Exec::Exec(const char*name, sg_host_t hostarg)
   this->host = hostarg;
 }
 
-simgrid::simix::Exec::~Exec()
+simgrid::kernel::activity::Exec::~Exec()
 {
   if (surf_exec)
     surf_exec->unref();
 }
-void simgrid::simix::Exec::suspend()
+void simgrid::kernel::activity::Exec::suspend()
 {
   if (surf_exec)
     surf_exec->suspend();
 }
 
-void simgrid::simix::Exec::resume()
+void simgrid::kernel::activity::Exec::resume()
 {
   if (surf_exec)
     surf_exec->resume();
 }
 
-double simgrid::simix::Exec::remains()
+double simgrid::kernel::activity::Exec::remains()
 {
   if (state == SIMIX_RUNNING)
     return surf_exec->getRemains();
@@ -42,7 +42,7 @@ double simgrid::simix::Exec::remains()
   return 0;
 }
 
-void simgrid::simix::Exec::post()
+void simgrid::kernel::activity::Exec::post()
 {
   if (host && host->isOff()) {/* FIMXE: handle resource failure for parallel tasks too */
     /* If the host running the synchro failed, notice it. This way, the asking
index b9747b8..facfa53 100644 (file)
@@ -10,7 +10,8 @@
 #include "src/kernel/activity/Synchro.h"
 
 namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace activity {
 
   XBT_PUBLIC_CLASS Exec : public Synchro {
     ~Exec() override;
@@ -25,5 +26,5 @@ namespace simix {
     surf_action_t surf_exec = nullptr; /* The Surf execution action encapsulated */
   };
 
-}} // namespace simgrid::simix
+}}} // namespace simgrid::kernel::activity
 #endif
index 05a7245..88a9c08 100644 (file)
@@ -8,19 +8,19 @@
 #include "src/simix/popping_private.h"
 #include "src/simix/smx_private.h"
 
-void simgrid::simix::Io::suspend()
+void simgrid::kernel::activity::Io::suspend()
 {
   if (surf_io)
     surf_io->suspend();
 }
 
-void simgrid::simix::Io::resume()
+void simgrid::kernel::activity::Io::resume()
 {
   if (surf_io)
     surf_io->resume();
 }
 
-void simgrid::simix::Io::post()
+void simgrid::kernel::activity::Io::post()
 {
   for (smx_simcall_t simcall : simcalls) {
     switch (simcall->call) {
index ef9213d..a5202ee 100644 (file)
@@ -10,7 +10,8 @@
 #include "src/kernel/activity/Synchro.h"
 
 namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace activity {
 
   XBT_PUBLIC_CLASS Io : public Synchro {
   public:
@@ -22,6 +23,6 @@ namespace simix {
     surf_action_t surf_io = nullptr;
   };
 
-}} // namespace simgrid::simix
+}}} // namespace simgrid::kernel::activity
 
 #endif
index 8fc2551..0f9e29f 100644 (file)
@@ -9,21 +9,21 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_synchro);
 
-simgrid::simix::Raw::~Raw()
+simgrid::kernel::activity::Raw::~Raw()
 {
   sleep->unref();
 }
-void simgrid::simix::Raw::suspend()
+void simgrid::kernel::activity::Raw::suspend()
 {
   /* The suspension of raw synchros is delayed to when the process is rescheduled. */
 }
 
-void simgrid::simix::Raw::resume()
+void simgrid::kernel::activity::Raw::resume()
 {
   /* I cannot resume raw synchros directly. This is delayed to when the process is rescheduled at
    * the end of the synchro. */
 }
-void simgrid::simix::Raw::post()
+void simgrid::kernel::activity::Raw::post()
 {
   XBT_IN("(%p)",this);
   if (sleep->getState() == simgrid::surf::Action::State::failed)
index 05914c0..cac619c 100644 (file)
@@ -10,7 +10,8 @@
 #include "src/kernel/activity/Synchro.h"
 
 namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace activity {
 
   /** Used to implement mutexes, semaphores and conditions */
   XBT_PUBLIC_CLASS Raw : public Synchro {
@@ -23,6 +24,6 @@ namespace simix {
     surf_action_t sleep = nullptr;
   };
 
-}} // namespace simgrid::simix
+}}} // namespace simgrid::kernel::activity
 
 #endif
index c82a720..e8f10df 100644 (file)
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_process);
 
-void simgrid::simix::Sleep::suspend()
+void simgrid::kernel::activity::Sleep::suspend()
 {
   surf_sleep->suspend();
 }
 
-void simgrid::simix::Sleep::resume()
+void simgrid::kernel::activity::Sleep::resume()
 {
   surf_sleep->resume();
 }
 
-void simgrid::simix::Sleep::post()
+void simgrid::kernel::activity::Sleep::post()
 {
   while (!simcalls.empty()) {
     smx_simcall_t simcall = simcalls.front();
index 1b838fe..d247833 100644 (file)
@@ -10,7 +10,8 @@
 #include "src/kernel/activity/Synchro.h"
 
 namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace activity {
 
   XBT_PUBLIC_CLASS Sleep : public Synchro {
   public:
@@ -22,6 +23,6 @@ namespace simix {
     surf_action_t surf_sleep = nullptr; /* The Surf sleeping action encapsulated */
   };
 
-}} // namespace simgrid::simix
+}}} // namespace simgrid::kernel::activity
 
 #endif
index e0f7a77..b8df562 100644 (file)
@@ -95,13 +95,13 @@ static char* print_determinism_result(e_mc_comm_pattern_difference_t diff, int p
 
 static void update_comm_pattern(
   simgrid::mc::PatternCommunication* comm_pattern,
-  simgrid::mc::RemotePtr<simgrid::simix::Comm> comm_addr)
+  simgrid::mc::RemotePtr<simgrid::kernel::activity::Comm> comm_addr)
 {
   // HACK, type punning
-  simgrid::mc::Remote<simgrid::simix::Comm> temp_comm;
+  simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
   mc_model_checker->process().read(temp_comm, comm_addr);
-  simgrid::simix::Comm* comm =
-    static_cast<simgrid::simix::Comm*>(temp_comm.getBuffer());
+  simgrid::kernel::activity::Comm* comm =
+    static_cast<simgrid::kernel::activity::Comm*>(temp_comm.getBuffer());
 
   smx_process_t src_proc = mc_model_checker->process().resolveProcess(
     simgrid::mc::remote(comm->src_proc));
@@ -195,11 +195,11 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim
     pattern->type = simgrid::mc::PatternCommunicationType::send;
     pattern->comm_addr = simcall_comm_isend__get__result(request);
 
-    simgrid::mc::Remote<simgrid::simix::Comm> temp_synchro;
+    simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_synchro;
     mc_model_checker->process().read(temp_synchro, remote(
-      static_cast<simgrid::simix::Comm*>(pattern->comm_addr)));
-    simgrid::simix::Comm* synchro =
-      static_cast<simgrid::simix::Comm*>(temp_synchro.getBuffer());
+      static_cast<simgrid::kernel::activity::Comm*>(pattern->comm_addr)));
+    simgrid::kernel::activity::Comm* synchro =
+      static_cast<simgrid::kernel::activity::Comm*>(temp_synchro.getBuffer());
 
     char* remote_name = mc_model_checker->process().read<char*>(
       (std::uint64_t)(synchro->mbox ? &synchro->mbox->name : &synchro->mbox_cpy->name));
@@ -244,10 +244,10 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim
       &mpi_request, remote((struct s_smpi_mpi_request*)simcall_comm_irecv__get__data(request)));
     pattern->tag = mpi_request.tag;
 
-    simgrid::mc::Remote<simgrid::simix::Comm> temp_comm;
+    simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
     mc_model_checker->process().read(temp_comm, remote(
-      static_cast<simgrid::simix::Comm*>(pattern->comm_addr)));
-    simgrid::simix::Comm* comm = temp_comm.getBuffer();
+      static_cast<simgrid::kernel::activity::Comm*>(pattern->comm_addr)));
+    simgrid::kernel::activity::Comm* comm = temp_comm.getBuffer();
 
     char* remote_name;
     mc_model_checker->process().read(&remote_name,
@@ -269,7 +269,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim
 
 
 void CommunicationDeterminismChecker::complete_comm_pattern(
-  xbt_dynar_t list, simgrid::mc::RemotePtr<simgrid::simix::Comm> comm_addr,
+  xbt_dynar_t list, simgrid::mc::RemotePtr<simgrid::kernel::activity::Comm> comm_addr,
   unsigned int issuer, int backtracking)
 {
   simgrid::mc::PatternCommunication* current_comm_pattern;
index 6235b80..9cfea26 100644 (file)
@@ -36,7 +36,7 @@ public:
   // These are used by functions which should be moved in CommunicationDeterminismChecker:
   void get_comm_pattern(xbt_dynar_t list, smx_simcall_t request, e_mc_call_type_t call_type, int backtracking);
   void complete_comm_pattern(
-    xbt_dynar_t list, simgrid::mc::RemotePtr<simgrid::simix::Comm> comm_addr,
+    xbt_dynar_t list, simgrid::mc::RemotePtr<simgrid::kernel::activity::Comm> comm_addr,
     unsigned int issuer, int backtracking);
 private:
   /** Stack representing the position in the exploration graph */
index c068886..aa6f7af 100644 (file)
@@ -86,15 +86,16 @@ bool request_is_enabled(smx_simcall_t req)
   case SIMCALL_COMM_WAIT:
   {
     /* FIXME: check also that src and dst processes are not suspended */
-    simgrid::simix::Comm *act = static_cast<simgrid::simix::Comm*>(simcall_comm_wait__get__comm(req));
+    simgrid::kernel::activity::Comm *act =
+        static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_wait__get__comm(req));
 
 #if HAVE_MC
     // Fetch from MCed memory:
     // HACK, type puning
-    simgrid::mc::Remote<simgrid::simix::Comm> temp_comm;
+    simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
     if (mc_model_checker != nullptr) {
       mc_model_checker->process().read(temp_comm, remote(act));
-      act = static_cast<simgrid::simix::Comm*>(temp_comm.getBuffer());
+      act = static_cast<simgrid::kernel::activity::Comm*>(temp_comm.getBuffer());
     }
 #endif
 
@@ -113,7 +114,8 @@ bool request_is_enabled(smx_simcall_t req)
 
   case SIMCALL_COMM_WAITANY: {
     xbt_dynar_t comms;
-    simgrid::simix::Comm *act = static_cast<simgrid::simix::Comm*>(simcall_comm_wait__get__comm(req));
+    simgrid::kernel::activity::Comm *act =
+        static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_wait__get__comm(req));
 #if HAVE_MC
 
     s_xbt_dynar_t comms_buffer;
@@ -141,15 +143,15 @@ bool request_is_enabled(smx_simcall_t req)
 #if HAVE_MC
       // Fetch act from MCed memory:
       // HACK, type puning
-      simgrid::mc::Remote<simgrid::simix::Comm> temp_comm;
+      simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
       if (mc_model_checker != nullptr) {
         memcpy(&act, buffer + comms->elmsize * index, sizeof(act));
         mc_model_checker->process().read(temp_comm, remote(act));
-        act = static_cast<simgrid::simix::Comm*>(temp_comm.getBuffer());
+        act = static_cast<simgrid::kernel::activity::Comm*>(temp_comm.getBuffer());
       }
       else
 #endif
-        act = xbt_dynar_get_as(comms, index, simgrid::simix::Comm*);
+        act = xbt_dynar_get_as(comms, index, simgrid::kernel::activity::Comm*);
       if (act->src_proc && act->dst_proc)
         return true;
     }
index 0b2549e..a2b49fe 100644 (file)
@@ -87,12 +87,12 @@ void MC_handle_comm_pattern(
   case MC_CALL_TYPE_WAIT:
   case MC_CALL_TYPE_WAITANY:
     {
-      simgrid::mc::RemotePtr<simgrid::simix::Comm> comm_addr = nullptr;
+      simgrid::mc::RemotePtr<simgrid::kernel::activity::Comm> comm_addr = nullptr;
       if (call_type == MC_CALL_TYPE_WAIT)
-        comm_addr = remote(static_cast<simgrid::simix::Comm*>(
+        comm_addr = remote(static_cast<simgrid::kernel::activity::Comm*>(
           simcall_comm_wait__get__comm(req)));
       else {
-        simgrid::simix::Comm* addr;
+        simgrid::kernel::activity::Comm* addr;
         // comm_addr = REMOTE(xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_synchro_t)):
         simgrid::mc::read_element(mc_model_checker->process(), &addr,
           remote(simcall_comm_waitany__get__comms(req)), value, sizeof(comm_addr));
index 1feb6e8..e7e0942 100644 (file)
@@ -27,13 +27,13 @@ static char *pointer_to_string(void *pointer);
 static char *buff_size_to_string(size_t size);
 
 static inline
-simgrid::simix::Comm* MC_get_comm(smx_simcall_t r)
+simgrid::kernel::activity::Comm* MC_get_comm(smx_simcall_t r)
 {
   switch (r->call ) {
   case SIMCALL_COMM_WAIT:
-    return static_cast<simgrid::simix::Comm*>(simcall_comm_wait__get__comm(r));
+    return static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_wait__get__comm(r));
   case SIMCALL_COMM_TEST:
-    return static_cast<simgrid::simix::Comm*>(simcall_comm_test__get__comm(r));
+    return static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_test__get__comm(r));
   default:
     return nullptr;
   }
@@ -67,8 +67,8 @@ bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2)
 
   // Those are internal requests, we do not need indirection
   // because those objects are copies:
-  simgrid::simix::Comm* synchro1 = MC_get_comm(r1);
-  simgrid::simix::Comm* synchro2 = MC_get_comm(r2);
+  simgrid::kernel::activity::Comm* synchro1 = MC_get_comm(r1);
+  simgrid::kernel::activity::Comm* synchro2 = MC_get_comm(r2);
 
   if ((r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
       && r2->call == SIMCALL_COMM_WAIT) {
@@ -154,8 +154,8 @@ bool request_depend(smx_simcall_t r1, smx_simcall_t r2)
 
   // Those are internal requests, we do not need indirection
   // because those objects are copies:
-  simgrid::simix::Comm* synchro1 = MC_get_comm(r1);
-  simgrid::simix::Comm* synchro2 = MC_get_comm(r2);
+  simgrid::kernel::activity::Comm* synchro1 = MC_get_comm(r1);
+  simgrid::kernel::activity::Comm* synchro2 = MC_get_comm(r2);
 
   switch(r1->call) {
   case SIMCALL_COMM_ISEND:
@@ -275,8 +275,8 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
   }
 
   case SIMCALL_COMM_WAIT: {
-    simgrid::simix::Comm* remote_act =
-      static_cast<simgrid::simix::Comm*>(simcall_comm_wait__get__comm(req));
+    simgrid::kernel::activity::Comm* remote_act =
+      static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_wait__get__comm(req));
     char* p;
     if (value == -1) {
       type = "WaitTimeout";
@@ -286,11 +286,11 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
       type = "Wait";
       p = pointer_to_string(remote_act);
 
-      simgrid::mc::Remote<simgrid::simix::Comm> temp_synchro;
-      simgrid::simix::Comm* act;
+      simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_synchro;
+      simgrid::kernel::activity::Comm* act;
       if (use_remote_comm) {
         mc_model_checker->process().read(temp_synchro, remote(
-          static_cast<simgrid::simix::Comm*>(remote_act)));
+          static_cast<simgrid::kernel::activity::Comm*>(remote_act)));
         act = temp_synchro.getBuffer();
       } else
         act = remote_act;
@@ -312,13 +312,13 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
   }
 
   case SIMCALL_COMM_TEST: {
-    simgrid::simix::Comm* remote_act = static_cast<simgrid::simix::Comm*>(
+    simgrid::kernel::activity::Comm* remote_act = static_cast<simgrid::kernel::activity::Comm*>(
       simcall_comm_test__get__comm(req));
-    simgrid::mc::Remote<simgrid::simix::Comm> temp_synchro;
-    simgrid::simix::Comm* act;
+    simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_synchro;
+    simgrid::kernel::activity::Comm* act;
     if (use_remote_comm) {
       mc_model_checker->process().read(temp_synchro, remote(
-        static_cast<simgrid::simix::Comm*>(remote_act)));
+        static_cast<simgrid::kernel::activity::Comm*>(remote_act)));
       act = temp_synchro.getBuffer();
     } else
       act = remote_act;
@@ -459,10 +459,10 @@ bool request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
     return true;
   }
 
-  simgrid::mc::Remote<simgrid::simix::Comm> temp_comm;
+  simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
   mc_model_checker->process().read(temp_comm, remote(
-    static_cast<simgrid::simix::Comm*>(remote_act)));
-  simgrid::simix::Comm* comm = temp_comm.getBuffer();
+    static_cast<simgrid::kernel::activity::Comm*>(remote_act)));
+  simgrid::kernel::activity::Comm* comm = temp_comm.getBuffer();
   return comm->src_proc && comm->dst_proc;
 }
 
@@ -524,10 +524,10 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
         label = simgrid::xbt::string_printf("[(%lu)] WaitTimeout", issuer->pid);
     } else {
       smx_synchro_t remote_act = simcall_comm_wait__get__comm(req);
-      simgrid::mc::Remote<simgrid::simix::Comm> temp_comm;
+      simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
       mc_model_checker->process().read(temp_comm, remote(
-        static_cast<simgrid::simix::Comm*>(remote_act)));
-      simgrid::simix::Comm* comm = temp_comm.getBuffer();
+        static_cast<simgrid::kernel::activity::Comm*>(remote_act)));
+      simgrid::kernel::activity::Comm* comm = temp_comm.getBuffer();
 
       smx_process_t src_proc = mc_model_checker->process().resolveProcess(
         simgrid::mc::remote(comm->src_proc));
@@ -550,10 +550,10 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
 
   case SIMCALL_COMM_TEST: {
     smx_synchro_t remote_act = simcall_comm_test__get__comm(req);
-    simgrid::mc::Remote<simgrid::simix::Comm> temp_comm;
+    simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
     mc_model_checker->process().read(temp_comm, remote(
-      static_cast<simgrid::simix::Comm*>(remote_act)));
-    simgrid::simix::Comm* comm = temp_comm.getBuffer();
+      static_cast<simgrid::kernel::activity::Comm*>(remote_act)));
+    simgrid::kernel::activity::Comm* comm = temp_comm.getBuffer();
     if (comm->src_proc == nullptr || comm->dst_proc == nullptr) {
       if (issuer->host)
         label = simgrid::xbt::string_printf("[(%lu)%s] Test FALSE",
index 59a9de0..56c566f 100644 (file)
@@ -124,11 +124,11 @@ static inline smx_simcall_t MC_state_get_request_for_process(
       }
 
       case SIMCALL_COMM_WAIT: {
-        simgrid::mc::RemotePtr<simgrid::simix::Comm> remote_act = remote(
-          static_cast<simgrid::simix::Comm*>(simcall_comm_wait__get__comm(&process->simcall)));
-        simgrid::mc::Remote<simgrid::simix::Comm> temp_act;
+        simgrid::mc::RemotePtr<simgrid::kernel::activity::Comm> remote_act = remote(
+          static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_wait__get__comm(&process->simcall)));
+        simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_act;
         mc_model_checker->process().read(temp_act, remote_act);
-        simgrid::simix::Comm* act = temp_act.getBuffer();
+        simgrid::kernel::activity::Comm* act = temp_act.getBuffer();
         if (act->src_proc && act->dst_proc)
           state->transition.argument = 0;
         else if (act->src_proc == nullptr && act->type == SIMIX_COMM_READY
@@ -178,7 +178,7 @@ static inline smx_simcall_t MC_state_get_request_for_process(
       &remote_comm, remote(simcall_comm_waitany__get__comms(req)),
       state->transition.argument, sizeof(remote_comm));
     mc_model_checker->process().read(state->internal_comm, remote(
-      static_cast<simgrid::simix::Comm*>(remote_comm)));
+      static_cast<simgrid::kernel::activity::Comm*>(remote_comm)));
     simcall_comm_wait__set__comm(&state->internal_req, state->internal_comm.getBuffer());
     simcall_comm_wait__set__timeout(&state->internal_req, 0);
     break;
@@ -192,7 +192,7 @@ static inline smx_simcall_t MC_state_get_request_for_process(
       smx_synchro_t remote_comm = mc_model_checker->process().read(
         remote(simcall_comm_testany__get__comms(req) + state->transition.argument));
       mc_model_checker->process().read(state->internal_comm, remote(
-        static_cast<simgrid::simix::Comm*>(remote_comm)));
+        static_cast<simgrid::kernel::activity::Comm*>(remote_comm)));
     }
 
     simcall_comm_test__set__comm(&state->internal_req, state->internal_comm.getBuffer());
index 81e2e34..be926fd 100644 (file)
@@ -136,7 +136,7 @@ struct XBT_PRIVATE State {
   s_smx_simcall_t internal_req;
 
   /* Can be used as a copy of the remote synchro object */
-  simgrid::mc::Remote<simgrid::simix::Comm> internal_comm;
+  simgrid::mc::Remote<simgrid::kernel::activity::Comm> internal_comm;
 
   /** Snapshot of system state (if needed) */
   std::shared_ptr<simgrid::mc::Snapshot> system_state;
index 4e12c2c..f036d97 100644 (file)
@@ -65,7 +65,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
     simdata->setUsed();
 
     if (simdata->host_nb > 0) {
-      simdata->compute = static_cast<simgrid::simix::Exec*>(
+      simdata->compute = static_cast<simgrid::kernel::activity::Exec*>(
           simcall_execution_parallel_start(task->name, simdata->host_nb,simdata->host_list,
                                                        simdata->flops_parallel_amount, simdata->bytes_parallel_amount,
                                                        1.0, -1.0));
@@ -77,7 +77,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
       XBT_DEBUG("execute %s@%s with affinity(0x%04lx)",
                 MSG_task_get_name(task), MSG_host_get_name(p_simdata->m_host), affinity_mask);
 
-          simdata->compute = static_cast<simgrid::simix::Exec*>(
+          simdata->compute = static_cast<simgrid::kernel::activity::Exec*>(
               simcall_execution_start(task->name, simdata->flops_amount, simdata->priority,
                                                  simdata->bound, affinity_mask));
     }
@@ -297,7 +297,7 @@ static inline msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *al
   /* Send it by calling SIMIX network layer */
   smx_synchro_t act = simcall_comm_isend(myself, mailbox, t_simdata->bytes_amount, t_simdata->rate,
                                          task, sizeof(void *), match_fun, cleanup, nullptr, match_data,detached);
-  t_simdata->comm = static_cast<simgrid::simix::Comm*>(act);
+  t_simdata->comm = static_cast<simgrid::kernel::activity::Comm*>(act);
 
   msg_comm_t comm = nullptr;
   if (! detached) {
@@ -503,7 +503,7 @@ int MSG_comm_testany(xbt_dynar_t comms)
   int finished_index = -1;
 
   /* Create the equivalent array with SIMIX objects: */
-  std::vector<simgrid::simix::Synchro*> s_comms;
+  std::vector<simgrid::kernel::activity::Synchro*> s_comms;
   s_comms.reserve(xbt_dynar_length(comms));
   msg_comm_t comm;
   unsigned int cursor;
@@ -690,7 +690,7 @@ msg_task_t MSG_comm_get_task(msg_comm_t comm)
  */
 void MSG_comm_copy_data_from_SIMIX(smx_synchro_t synchro, void* buff, size_t buff_size)
 {
-  simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
 
   SIMIX_comm_copy_pointer_callback(comm, buff, buff_size);
 
@@ -780,7 +780,7 @@ msg_error_t MSG_task_send_with_timeout(msg_task_t task, const char *alias, doubl
                               t_simdata->rate, task, sizeof(void *), nullptr, nullptr, nullptr, task, 0);
     if (TRACE_is_enabled())
       simcall_set_category(comm, task->category);
-     t_simdata->comm = static_cast<simgrid::simix::Comm*>(comm);
+     t_simdata->comm = static_cast<simgrid::kernel::activity::Comm*>(comm);
      simcall_comm_wait(comm, timeout);
   }
   catch (xbt_ex& e) {
@@ -852,7 +852,7 @@ int MSG_task_listen(const char *alias)
 int MSG_task_listen_from(const char *alias)
 {
   msg_mailbox_t mbox = MSG_mailbox_get_by_alias(alias);
-  simgrid::simix::Comm* comm = static_cast<simgrid::simix::Comm*>(simcall_mbox_front(mbox));
+  simgrid::kernel::activity::Comm* comm = static_cast<simgrid::kernel::activity::Comm*>(simcall_mbox_front(mbox));
 
   if (!comm)
     return -1;
index 6f5528b..d463698 100644 (file)
@@ -20,7 +20,7 @@ int MSG_mailbox_is_empty(msg_mailbox_t mailbox)
 
 msg_task_t MSG_mailbox_front(msg_mailbox_t mailbox)
 {
-  simgrid::simix::Comm* comm = static_cast<simgrid::simix::Comm*>(simcall_mbox_front(mailbox));
+  simgrid::kernel::activity::Comm* comm = static_cast<simgrid::kernel::activity::Comm*>(simcall_mbox_front(mailbox));
 
   if (!comm)
     return nullptr;
index 1dea625..d7d6610 100644 (file)
@@ -47,8 +47,8 @@ typedef struct simdata_task {
     this->isused = false;
   }
 
-  simgrid::simix::Exec *compute = nullptr; /* SIMIX modeling of computation */
-  simgrid::simix::Comm *comm = nullptr;    /* SIMIX modeling of communication */
+  simgrid::kernel::activity::Exec *compute = nullptr; /* SIMIX modeling of computation */
+  simgrid::kernel::activity::Comm *comm = nullptr;    /* SIMIX modeling of communication */
   double bytes_amount = 0.0; /* Data size */
   double flops_amount = 0.0; /* Computation size */
   msg_process_t sender = nullptr;
index dee4345..e2adf77 100644 (file)
@@ -390,7 +390,7 @@ void MSG_task_set_affinity(msg_task_t task, msg_host_t host, unsigned long mask)
     return;
   }
 
-  simgrid::simix::Exec *compute = task->simdata->compute;
+  simgrid::kernel::activity::Exec *compute = task->simdata->compute;
   msg_host_t host_now = compute->host;  // simix_private.h is necessary
   if (host_now != host) {
     /* task is not yet executed on this host */
index 00493b8..626f177 100644 (file)
@@ -757,7 +757,7 @@ smx_synchro_t simcall_comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag
 void simcall_comm_cancel(smx_synchro_t synchro)
 {
   simgrid::simix::kernelImmediate([synchro]{
-    simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+    simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
     comm->cancel();
   });
 }
index b035b1f..1ecce23 100644 (file)
@@ -658,19 +658,19 @@ void SIMIX_display_process_status(void)
 
       const char* synchro_description = "unknown";
 
-      if (dynamic_cast<simgrid::simix::Exec*>(process->waiting_synchro) != nullptr)
+      if (dynamic_cast<simgrid::kernel::activity::Exec*>(process->waiting_synchro) != nullptr)
         synchro_description = "execution";
 
-      if (dynamic_cast<simgrid::simix::Comm*>(process->waiting_synchro) != nullptr)
+      if (dynamic_cast<simgrid::kernel::activity::Comm*>(process->waiting_synchro) != nullptr)
         synchro_description = "communication";
 
-      if (dynamic_cast<simgrid::simix::Sleep*>(process->waiting_synchro) != nullptr)
+      if (dynamic_cast<simgrid::kernel::activity::Sleep*>(process->waiting_synchro) != nullptr)
         synchro_description = "sleeping";
 
-      if (dynamic_cast<simgrid::simix::Raw*>(process->waiting_synchro) != nullptr)
+      if (dynamic_cast<simgrid::kernel::activity::Raw*>(process->waiting_synchro) != nullptr)
         synchro_description = "synchronization";
 
-      if (dynamic_cast<simgrid::simix::Io*>(process->waiting_synchro) != nullptr)
+      if (dynamic_cast<simgrid::kernel::activity::Io*>(process->waiting_synchro) != nullptr)
         synchro_description = "I/O";
 
 
index caae036..a0be3c8 100644 (file)
@@ -211,7 +211,7 @@ smx_synchro_t SIMIX_execution_start(smx_process_t issuer, const char *name, doub
                                     double bound, unsigned long affinity_mask){
 
   /* alloc structures and initialize */
-  simgrid::simix::Exec *exec = new simgrid::simix::Exec(name, issuer->host);
+  simgrid::kernel::activity::Exec *exec = new simgrid::kernel::activity::Exec(name, issuer->host);
 
   /* set surf's action */
   if (!MC_is_active() && !MC_record_replay_is_active()) {
@@ -240,7 +240,7 @@ smx_synchro_t SIMIX_execution_parallel_start(const char *name, int host_nb, sg_h
                                              double *bytes_amount, double amount, double rate){
 
   /* alloc structures and initialize */
-  simgrid::simix::Exec *exec = new simgrid::simix::Exec(name, nullptr);
+  simgrid::kernel::activity::Exec *exec = new simgrid::kernel::activity::Exec(name, nullptr);
 
   /* set surf's synchro */
   sg_host_t *host_list_cpy = xbt_new0(sg_host_t, host_nb);
@@ -268,7 +268,7 @@ smx_synchro_t SIMIX_execution_parallel_start(const char *name, int host_nb, sg_h
 void SIMIX_execution_cancel(smx_synchro_t synchro)
 {
   XBT_DEBUG("Cancel synchro %p", synchro);
-  simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
+  simgrid::kernel::activity::Exec *exec = static_cast<simgrid::kernel::activity::Exec *>(synchro);
 
   if (exec->surf_exec)
     exec->surf_exec->cancel();
@@ -276,21 +276,21 @@ void SIMIX_execution_cancel(smx_synchro_t synchro)
 
 void SIMIX_execution_set_priority(smx_synchro_t synchro, double priority)
 {
-  simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
+  simgrid::kernel::activity::Exec *exec = static_cast<simgrid::kernel::activity::Exec *>(synchro);
   if(exec->surf_exec)
     exec->surf_exec->setPriority(priority);
 }
 
 void SIMIX_execution_set_bound(smx_synchro_t synchro, double bound)
 {
-  simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
+  simgrid::kernel::activity::Exec *exec = static_cast<simgrid::kernel::activity::Exec *>(synchro);
   if(exec->surf_exec)
     static_cast<simgrid::surf::CpuAction*>(exec->surf_exec)->setBound(bound);
 }
 
 void SIMIX_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask)
 {
-  simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
+  simgrid::kernel::activity::Exec *exec = static_cast<simgrid::kernel::activity::Exec *>(synchro);
   if(exec->surf_exec) {
     /* just a double check to confirm that this host is the host where this task is running. */
     xbt_assert(exec->host == host);
@@ -300,7 +300,7 @@ void SIMIX_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigne
 
 void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro)
 {
-  simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
+  simgrid::kernel::activity::Exec *exec = static_cast<simgrid::kernel::activity::Exec *>(synchro);
   XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro, (int)synchro->state);
 
   /* Associate this simcall to the synchro */
@@ -319,7 +319,7 @@ void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro
     SIMIX_execution_finish(exec);
 }
 
-void SIMIX_execution_finish(simgrid::simix::Exec *exec)
+void SIMIX_execution_finish(simgrid::kernel::activity::Exec *exec)
 {
   for (smx_simcall_t simcall : exec->simcalls) {
     switch (exec->state) {
@@ -362,13 +362,13 @@ void SIMIX_set_category(smx_synchro_t synchro, const char *category)
   if (synchro->state != SIMIX_RUNNING)
     return;
 
-  simgrid::simix::Exec *exec = dynamic_cast<simgrid::simix::Exec *>(synchro);
+  simgrid::kernel::activity::Exec *exec = dynamic_cast<simgrid::kernel::activity::Exec *>(synchro);
   if (exec != nullptr) {
     exec->surf_exec->setCategory(category);
     return;
   }
 
-  simgrid::simix::Comm *comm = dynamic_cast<simgrid::simix::Comm *>(synchro);
+  simgrid::kernel::activity::Comm *comm = dynamic_cast<simgrid::kernel::activity::Comm *>(synchro);
   if (comm != nullptr) {
     comm->surf_comm->setCategory(category);
     return;
index 4505f98..767c3ea 100644 (file)
@@ -51,7 +51,7 @@ XBT_PRIVATE void SIMIX_execution_set_priority(smx_synchro_t synchro, double prio
 XBT_PRIVATE void SIMIX_execution_set_bound(smx_synchro_t synchro, double bound);
 XBT_PRIVATE void SIMIX_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask);
 
-XBT_PRIVATE void SIMIX_execution_finish(simgrid::simix::Exec *exec);
+XBT_PRIVATE void SIMIX_execution_finish(simgrid::kernel::activity::Exec *exec);
 
 XBT_PRIVATE void SIMIX_set_category(smx_synchro_t synchro, const char *category);
 
index a9c34d0..c4eaa4a 100644 (file)
@@ -70,7 +70,7 @@ smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, sg_host_t host)
     THROWF(host_error, 0, "Host %s failed, you cannot call this function", sg_host_get_name(host));
 
 
-  simgrid::simix::Io *synchro = new simgrid::simix::Io();
+  simgrid::kernel::activity::Io *synchro = new simgrid::kernel::activity::Io();
   synchro->host = host;
   synchro->surf_io = surf_host_read(host, fd->surf_file, size);
 
@@ -93,7 +93,7 @@ smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, sg_host_t host)
   if (host->isOff())
     THROWF(host_error, 0, "Host %s failed, you cannot call this function", sg_host_get_name(host));
 
-  simgrid::simix::Io *synchro = new simgrid::simix::Io();
+  simgrid::kernel::activity::Io *synchro = new simgrid::kernel::activity::Io();
   synchro->host = host;
   synchro->surf_io = surf_host_write(host, fd->surf_file, size);
   synchro->surf_io->setData(synchro);
@@ -115,7 +115,7 @@ smx_synchro_t SIMIX_file_open(const char* fullpath, sg_host_t host)
   if (host->isOff())
     THROWF(host_error, 0, "Host %s failed, you cannot call this function", sg_host_get_name(host));
 
-  simgrid::simix::Io *synchro = new simgrid::simix::Io();
+  simgrid::kernel::activity::Io *synchro = new simgrid::kernel::activity::Io();
   synchro->host = host;
   synchro->surf_io = surf_host_open(host, fullpath);
   synchro->surf_io->setData(synchro);
@@ -137,7 +137,7 @@ smx_synchro_t SIMIX_file_close(smx_file_t fd, sg_host_t host)
   if (host->isOff())
     THROWF(host_error, 0, "Host %s failed, you cannot call this function", sg_host_get_name(host));
 
-  simgrid::simix::Io *synchro = new simgrid::simix::Io();
+  simgrid::kernel::activity::Io *synchro = new simgrid::kernel::activity::Io();
   synchro->host = host;
   synchro->surf_io = surf_host_close(host, fd->surf_file);
   synchro->surf_io->setData(synchro);
@@ -255,7 +255,7 @@ const char* SIMIX_storage_get_host(smx_storage_t storage){
 
 void SIMIX_io_destroy(smx_synchro_t synchro)
 {
-  simgrid::simix::Io *io = static_cast<simgrid::simix::Io*>(synchro);
+  simgrid::kernel::activity::Io *io = static_cast<simgrid::kernel::activity::Io*>(synchro);
   XBT_DEBUG("Destroy synchro %p", synchro);
   if (io->surf_io)
     io->surf_io->unref();
index 792a7a7..cbc15eb 100644 (file)
@@ -84,7 +84,7 @@ void SIMIX_mbox_set_receiver(smx_mailbox_t mbox, smx_process_t process)
  */
 static inline void SIMIX_mbox_push(smx_mailbox_t mbox, smx_synchro_t synchro)
 {
-  simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
   mbox->comm_queue.push_back(comm);
   comm->mbox = mbox;
 }
@@ -96,7 +96,7 @@ static inline void SIMIX_mbox_push(smx_mailbox_t mbox, smx_synchro_t synchro)
  */
 void SIMIX_mbox_remove(smx_mailbox_t mbox, smx_synchro_t synchro)
 {
-  simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
 
   comm->mbox = nullptr;
   for (auto it = mbox->comm_queue.begin(); it != mbox->comm_queue.end(); it++)
@@ -119,7 +119,7 @@ static smx_synchro_t _find_matching_comm(std::deque<smx_synchro_t> *deque, e_smx
 
   for(auto it = deque->begin(); it != deque->end(); it++){
     smx_synchro_t synchro = *it;
-    simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+    simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
 
     if (comm->type == SIMIX_COMM_SEND) {
       other_user_data = comm->src_data;
@@ -173,7 +173,7 @@ XBT_PRIVATE smx_synchro_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_
   XBT_DEBUG("send from %p", mbox);
 
   /* Prepare a synchro describing us, so that it gets passed to the user-provided filter of other side */
-  simgrid::simix::Comm* this_synchro = new simgrid::simix::Comm(SIMIX_COMM_SEND);
+  simgrid::kernel::activity::Comm* this_synchro = new simgrid::kernel::activity::Comm(SIMIX_COMM_SEND);
 
   /* Look for communication synchro matching our needs. We also provide a description of
    * ourself so that the other side also gets a chance of choosing if it wants to match with us.
@@ -181,12 +181,12 @@ XBT_PRIVATE smx_synchro_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_
    * If it is not found then push our communication into the rendez-vous point */
   smx_synchro_t other_synchro =
       _find_matching_comm(&mbox->comm_queue, SIMIX_COMM_RECEIVE, match_fun, data, this_synchro, /*remove_matching*/true);
-  simgrid::simix::Comm *other_comm = static_cast<simgrid::simix::Comm*>(other_synchro);
+  simgrid::kernel::activity::Comm *other_comm = static_cast<simgrid::kernel::activity::Comm*>(other_synchro);
 
 
   if (!other_synchro) {
     other_synchro = this_synchro;
-    other_comm = static_cast<simgrid::simix::Comm*>(other_synchro);
+    other_comm = static_cast<simgrid::kernel::activity::Comm*>(other_synchro);
 
     if (mbox->permanent_receiver!=nullptr){
       //this mailbox is for small messages, which have to be sent right now
@@ -265,7 +265,7 @@ smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox, void
     void *data, double rate)
 {
   XBT_DEBUG("recv from %p %p", mbox, &mbox->comm_queue);
-  simgrid::simix::Comm* this_synchro = new simgrid::simix::Comm(SIMIX_COMM_RECEIVE);
+  simgrid::kernel::activity::Comm* this_synchro = new simgrid::kernel::activity::Comm(SIMIX_COMM_RECEIVE);
 
   smx_synchro_t other_synchro;
   //communication already done, get it inside the fifo of completed comms
@@ -280,7 +280,7 @@ smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox, void
       other_synchro = this_synchro;
       SIMIX_mbox_push(mbox, this_synchro);
     } else {
-      simgrid::simix::Comm *other_comm = static_cast<simgrid::simix::Comm*>(other_synchro);
+      simgrid::kernel::activity::Comm *other_comm = static_cast<simgrid::kernel::activity::Comm*>(other_synchro);
 
       if(other_comm->surf_comm && other_comm->remains()==0.0) {
         XBT_DEBUG("comm %p has been already sent, and is finished, destroy it",other_comm);
@@ -289,7 +289,7 @@ smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox, void
         other_comm->mbox = nullptr;
       }
       other_comm->unref();
-      static_cast<simgrid::simix::Comm*>(this_synchro)->unref();
+      static_cast<simgrid::kernel::activity::Comm*>(this_synchro)->unref();
     }
   } else {
     /* Prepare a synchro describing us, so that it gets passed to the user-provided filter of other side */
@@ -306,7 +306,7 @@ smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox, void
       SIMIX_mbox_push(mbox, this_synchro);
     } else {
       this_synchro->unref();
-      simgrid::simix::Comm *other_comm = static_cast<simgrid::simix::Comm*>(other_synchro);
+      simgrid::kernel::activity::Comm *other_comm = static_cast<simgrid::kernel::activity::Comm*>(other_synchro);
 
       other_comm->state = SIMIX_READY;
       other_comm->type = SIMIX_COMM_READY;
@@ -315,7 +315,7 @@ smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox, void
   }
 
   /* Setup communication synchro */
-  simgrid::simix::Comm *other_comm = static_cast<simgrid::simix::Comm*>(other_synchro);
+  simgrid::kernel::activity::Comm *other_comm = static_cast<simgrid::kernel::activity::Comm*>(other_synchro);
   other_comm->dst_proc = dst_proc;
   other_comm->dst_buff = dst_buff;
   other_comm->dst_buff_size = dst_buff_size;
@@ -347,13 +347,13 @@ smx_synchro_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_mailbox_t mbox, int
                               int tag, int (*match_fun)(void *, void *, smx_synchro_t), void *data)
 {
   XBT_DEBUG("iprobe from %p %p", mbox, &mbox->comm_queue);
-  simgrid::simix::Comm* this_comm;
+  simgrid::kernel::activity::Comm* this_comm;
   int smx_type;
   if(type == 1){
-    this_comm = new simgrid::simix::Comm(SIMIX_COMM_SEND);
+    this_comm = new simgrid::kernel::activity::Comm(SIMIX_COMM_SEND);
     smx_type = SIMIX_COMM_RECEIVE;
   } else{
-    this_comm = new simgrid::simix::Comm(SIMIX_COMM_RECEIVE);
+    this_comm = new simgrid::kernel::activity::Comm(SIMIX_COMM_RECEIVE);
     smx_type = SIMIX_COMM_SEND;
   } 
   smx_synchro_t other_synchro=nullptr;
@@ -393,7 +393,7 @@ void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_synchro_t synchro, dou
       if (timeout == -1)
         THROW_IMPOSSIBLE;
 
-      simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+      simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
       if (comm->src_proc == simcall->issuer)
         comm->state = SIMIX_SRC_TIMEOUT;
       else
@@ -412,7 +412,7 @@ void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_synchro_t synchro, dou
     surf_action_t sleep = surf_host_sleep(simcall->issuer->host, timeout);
     sleep->setData(synchro);
 
-    simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+    simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
     if (simcall->issuer == comm->src_proc)
       comm->src_timeout = sleep;
     else
@@ -422,7 +422,7 @@ void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_synchro_t synchro, dou
 
 void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_synchro_t synchro)
 {
-  simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
 
   if (MC_is_active() || MC_record_replay_is_active()){
     simcall_comm_test__set__result(simcall, comm->src_proc && comm->dst_proc);
@@ -446,7 +446,7 @@ void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_synchro_t synchro)
 }
 
 void simcall_HANDLER_comm_testany(
-  smx_simcall_t simcall, simgrid::simix::Synchro* comms[], size_t count)
+  smx_simcall_t simcall, simgrid::kernel::activity::Synchro* comms[], size_t count)
 {
   // The default result is -1 -- this means, "nothing is ready".
   // It can be changed below, but only if something matches.
@@ -457,7 +457,7 @@ void simcall_HANDLER_comm_testany(
     if(idx == -1){
       SIMIX_simcall_answer(simcall);
     }else{
-      simgrid::simix::Synchro* synchro = comms[idx];
+      simgrid::kernel::activity::Synchro* synchro = comms[idx];
       simcall_comm_testany__set__result(simcall, idx);
       synchro->simcalls.push_back(simcall);
       synchro->state = SIMIX_DONE;
@@ -467,7 +467,7 @@ void simcall_HANDLER_comm_testany(
   }
 
   for (std::size_t i = 0; i != count; ++i) {
-    simgrid::simix::Synchro* synchro = comms[i];
+    simgrid::kernel::activity::Synchro* synchro = comms[i];
     if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
       simcall_comm_testany__set__result(simcall, i);
       synchro->simcalls.push_back(simcall);
@@ -537,7 +537,7 @@ void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall)
  */
 static inline void SIMIX_comm_start(smx_synchro_t synchro)
 {
-  simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
 
   /* If both the sender and the receiver are already there, start the communication */
   if (synchro->state == SIMIX_READY) {
@@ -580,7 +580,7 @@ static inline void SIMIX_comm_start(smx_synchro_t synchro)
  */
 void SIMIX_comm_finish(smx_synchro_t synchro)
 {
-  simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
   unsigned int destroy_count = 0;
 
   while (!synchro->simcalls.empty()) {
@@ -726,7 +726,7 @@ void SIMIX_comm_finish(smx_synchro_t synchro)
   }
 
   while (destroy_count-- > 0)
-    static_cast<simgrid::simix::Comm*>(synchro)->unref();
+    static_cast<simgrid::kernel::activity::Comm*>(synchro)->unref();
 }
 
 /******************************************************************************/
@@ -741,7 +741,7 @@ void SIMIX_comm_set_copy_data_callback(void (*callback) (smx_synchro_t, void*, s
 
 void SIMIX_comm_copy_pointer_callback(smx_synchro_t synchro, void* buff, size_t buff_size)
 {
-  simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
 
   xbt_assert((buff_size == sizeof(void *)), "Cannot copy %zu bytes: must be sizeof(void*)", buff_size);
   *(void **) (comm->dst_buff) = buff;
@@ -749,7 +749,7 @@ void SIMIX_comm_copy_pointer_callback(smx_synchro_t synchro, void* buff, size_t
 
 void SIMIX_comm_copy_buffer_callback(smx_synchro_t synchro, void* buff, size_t buff_size)
 {
-  simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
 
   XBT_DEBUG("Copy the data over");
   memcpy(comm->dst_buff, buff, buff_size);
@@ -766,7 +766,7 @@ void SIMIX_comm_copy_buffer_callback(smx_synchro_t synchro, void* buff, size_t b
  */
 void SIMIX_comm_copy_data(smx_synchro_t synchro)
 {
-  simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
 
   size_t buff_size = comm->src_buff_size;
   /* If there is no data to copy then return */
index 6218716..b9bd15e 100644 (file)
@@ -96,7 +96,7 @@ void SIMIX_process_cleanup(smx_process_t process)
   /* cancel non-blocking communications */
   smx_synchro_t synchro = static_cast<smx_synchro_t>(xbt_fifo_pop(process->comms));
   while (synchro != nullptr) {
-    simgrid::simix::Comm *comm = static_cast<simgrid::simix::Comm*>(synchro);
+    simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
 
     /* make sure no one will finish the comm after this process is destroyed,
      * because src_proc or dst_proc would be an invalid pointer */
@@ -467,11 +467,11 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
   /* destroy the blocking synchro if any */
   if (process->waiting_synchro) {
 
-    simgrid::simix::Exec *exec = dynamic_cast<simgrid::simix::Exec*>(process->waiting_synchro);
-    simgrid::simix::Comm *comm = dynamic_cast<simgrid::simix::Comm*>(process->waiting_synchro);
-    simgrid::simix::Sleep *sleep = dynamic_cast<simgrid::simix::Sleep*>(process->waiting_synchro);
-    simgrid::simix::Raw *raw = dynamic_cast<simgrid::simix::Raw*>(process->waiting_synchro);
-    simgrid::simix::Io *io = dynamic_cast<simgrid::simix::Io*>(process->waiting_synchro);
+    simgrid::kernel::activity::Exec *exec = dynamic_cast<simgrid::kernel::activity::Exec*>(process->waiting_synchro);
+    simgrid::kernel::activity::Comm *comm = dynamic_cast<simgrid::kernel::activity::Comm*>(process->waiting_synchro);
+    simgrid::kernel::activity::Sleep *sleep = dynamic_cast<simgrid::kernel::activity::Sleep*>(process->waiting_synchro);
+    simgrid::kernel::activity::Raw *raw = dynamic_cast<simgrid::kernel::activity::Raw*>(process->waiting_synchro);
+    simgrid::kernel::activity::Io *io = dynamic_cast<simgrid::kernel::activity::Io*>(process->waiting_synchro);
 
     if (exec != nullptr) {
       exec->unref();
@@ -530,18 +530,18 @@ void SIMIX_process_throw(smx_process_t process, xbt_errcat_t cat, int value, con
   /* cancel the blocking synchro if any */
   if (process->waiting_synchro) {
 
-    simgrid::simix::Exec *exec = dynamic_cast<simgrid::simix::Exec*>(process->waiting_synchro);
+    simgrid::kernel::activity::Exec *exec = dynamic_cast<simgrid::kernel::activity::Exec*>(process->waiting_synchro);
     if (exec != nullptr) {
       SIMIX_execution_cancel(process->waiting_synchro);
     }
 
-    simgrid::simix::Comm *comm = dynamic_cast<simgrid::simix::Comm*>(process->waiting_synchro);
+    simgrid::kernel::activity::Comm *comm = dynamic_cast<simgrid::kernel::activity::Comm*>(process->waiting_synchro);
     if (comm != nullptr) {
       xbt_fifo_remove(process->comms, comm);
       comm->cancel();
     }
 
-    simgrid::simix::Sleep *sleep = dynamic_cast<simgrid::simix::Sleep*>(process->waiting_synchro);
+    simgrid::kernel::activity::Sleep *sleep = dynamic_cast<simgrid::kernel::activity::Sleep*>(process->waiting_synchro);
     if (sleep != nullptr) {
       SIMIX_process_sleep_destroy(process->waiting_synchro);
       if (!xbt_dynar_member(simix_global->process_to_run, &(process)) && process != SIMIX_process_self()) {
@@ -550,12 +550,12 @@ void SIMIX_process_throw(smx_process_t process, xbt_errcat_t cat, int value, con
       }
     }
 
-    simgrid::simix::Raw *raw = dynamic_cast<simgrid::simix::Raw*>(process->waiting_synchro);
+    simgrid::kernel::activity::Raw *raw = dynamic_cast<simgrid::kernel::activity::Raw*>(process->waiting_synchro);
     if (raw != nullptr) {
       SIMIX_synchro_stop_waiting(process, &process->simcall);
     }
 
-    simgrid::simix::Io *io = dynamic_cast<simgrid::simix::Io*>(process->waiting_synchro);
+    simgrid::kernel::activity::Io *io = dynamic_cast<simgrid::kernel::activity::Io*>(process->waiting_synchro);
     if (io != nullptr) {
       SIMIX_io_destroy(process->waiting_synchro);
     }
@@ -772,7 +772,7 @@ void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process,
 }
 
 static int SIMIX_process_join_finish(smx_process_exit_status_t status, smx_synchro_t synchro){
-  simgrid::simix::Sleep *sleep = static_cast<simgrid::simix::Sleep*>(synchro);
+  simgrid::kernel::activity::Sleep *sleep = static_cast<simgrid::kernel::activity::Sleep*>(synchro);
 
   if (sleep->surf_sleep) {
     sleep->surf_sleep->cancel();
@@ -800,7 +800,7 @@ static int SIMIX_process_join_finish(smx_process_exit_status_t status, smx_synch
 smx_synchro_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, double timeout)
 {
   smx_synchro_t res = SIMIX_process_sleep(issuer, timeout);
-  static_cast<simgrid::simix::Synchro*>(res)->ref();
+  static_cast<simgrid::kernel::activity::Synchro*>(res)->ref();
   SIMIX_process_on_exit(process, (int_f_pvoid_pvoid_t)SIMIX_process_join_finish, res);
   return res;
 }
@@ -826,7 +826,7 @@ smx_synchro_t SIMIX_process_sleep(smx_process_t process, double duration)
   if (host->isOff())
     THROWF(host_error, 0, "Host %s failed, you cannot call this function", sg_host_get_name(host));
 
-  simgrid::simix::Sleep *synchro = new simgrid::simix::Sleep();
+  simgrid::kernel::activity::Sleep *synchro = new simgrid::kernel::activity::Sleep();
   synchro->host = host;
   synchro->surf_sleep = surf_host_sleep(host, duration);
   synchro->surf_sleep->setData(synchro);
@@ -838,7 +838,7 @@ smx_synchro_t SIMIX_process_sleep(smx_process_t process, double duration)
 void SIMIX_process_sleep_destroy(smx_synchro_t synchro)
 {
   XBT_DEBUG("Destroy synchro %p", synchro);
-  simgrid::simix::Sleep *sleep = static_cast<simgrid::simix::Sleep*>(synchro);
+  simgrid::kernel::activity::Sleep *sleep = static_cast<simgrid::kernel::activity::Sleep*>(synchro);
 
   if (sleep->surf_sleep) {
     sleep->surf_sleep->unref();
index bdda602..cde0af9 100644 (file)
@@ -27,7 +27,7 @@ static smx_synchro_t SIMIX_synchro_wait(sg_host_t smx_host, double timeout)
 {
   XBT_IN("(%p, %f)",smx_host,timeout);
 
-  simgrid::simix::Raw *sync = new simgrid::simix::Raw();
+  simgrid::kernel::activity::Raw *sync = new simgrid::kernel::activity::Raw();
   sync->sleep = surf_host_sleep(smx_host, timeout);
   sync->sleep->setData(sync);
   XBT_OUT();
index 61b11ef..b2f5765 100644 (file)
@@ -773,7 +773,7 @@ int smpi_mpi_test(MPI_Request * request, MPI_Status * status) {
 
 int smpi_mpi_testany(int count, MPI_Request requests[], int *index, MPI_Status * status)
 {
-  std::vector<simgrid::simix::Synchro*> comms;
+  std::vector<simgrid::kernel::activity::Synchro*> comms;
   comms.reserve(count);
 
   int i;
@@ -877,8 +877,8 @@ void smpi_mpi_iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
   }
 
   if (request->action != nullptr){
-    simgrid::simix::Comm *sync_comm = static_cast<simgrid::simix::Comm*>(request->action);
-    MPI_Request req                 = static_cast<MPI_Request>(sync_comm->src_data);
+    simgrid::kernel::activity::Comm *sync_comm = static_cast<simgrid::kernel::activity::Comm*>(request->action);
+    MPI_Request req                            = static_cast<MPI_Request>(sync_comm->src_data);
     *flag = 1;
     if(status != MPI_STATUS_IGNORE && (req->flags & PREPARED) == 0) {
       status->MPI_SOURCE = smpi_group_rank(smpi_comm_group(comm), req->src);
index 0d90ef2..797873c 100644 (file)
@@ -389,7 +389,7 @@ void smpi_comm_copy_buffer_callback(smx_synchro_t synchro, void *buff, size_t bu
 {
   XBT_DEBUG("Copy the data over");
   void* tmpbuff=buff;
-  simgrid::simix::Comm *comm = dynamic_cast<simgrid::simix::Comm*>(synchro);
+  simgrid::kernel::activity::Comm *comm = dynamic_cast<simgrid::kernel::activity::Comm*>(synchro);
 
   if((smpi_privatize_global_variables) && (static_cast<char*>(buff) >= smpi_start_data_exe)
       && (static_cast<char*>(buff) < smpi_start_data_exe + smpi_size_data_exe )