Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use kernelImmediate for simcall set_category.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 3 May 2018 13:56:56 +0000 (15:56 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 3 May 2018 18:53:51 +0000 (20:53 +0200)
src/simix/libsmx.cpp
src/simix/popping_accessors.hpp
src/simix/popping_bodies.cpp
src/simix/popping_enum.h
src/simix/popping_generated.cpp
src/simix/simcalls.in

index 4f28081..25aaed1 100644 (file)
@@ -389,7 +389,7 @@ void simcall_set_category(smx_activity_t synchro, const char *category)
   if (category == nullptr) {
     return;
   }
   if (category == nullptr) {
     return;
   }
-  simcall_BODY_set_category(synchro, category);
+  simgrid::simix::kernelImmediate([synchro, category] { SIMIX_set_category(synchro, category); });
 }
 
 /**
 }
 
 /**
index 3a0db68..272bbd0 100644 (file)
@@ -1257,31 +1257,6 @@ static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int res
   simgrid::simix::marshal<int>(simcall->result, result);
 }
 
   simgrid::simix::marshal<int>(simcall->result, result);
 }
 
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_set_category__get__synchro(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]);
-}
-static inline simgrid::kernel::activity::ActivityImpl* simcall_set_category__getraw__synchro(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->args[0]);
-}
-static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
-{
-  simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0], arg);
-}
-static inline const char* simcall_set_category__get__category(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<const char*>(simcall->args[1]);
-}
-static inline const char* simcall_set_category__getraw__category(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<const char*>(simcall->args[1]);
-}
-static inline void simcall_set_category__set__category(smx_simcall_t simcall, const char* arg)
-{
-  simgrid::simix::marshal<const char*>(simcall->args[1], arg);
-}
-
 static inline std::function<void()> const* simcall_run_kernel__get__code(smx_simcall_t simcall)
 {
   return simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]);
 static inline std::function<void()> const* simcall_run_kernel__get__code(smx_simcall_t simcall)
 {
   return simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]);
index 15fed68..8625328 100644 (file)
@@ -228,13 +228,6 @@ inline static int simcall_BODY_mc_random(int min, int max)
   return simcall<int, int, int>(SIMCALL_MC_RANDOM, min, max);
 }
 
   return simcall<int, int, int>(SIMCALL_MC_RANDOM, min, max);
 }
 
-inline static void simcall_BODY_set_category(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> synchro, const char* category)
-{
-  if (0) /* Go to that function to follow the code flow through the simcall barrier */
-    SIMIX_set_category(synchro, category);
-  return simcall<void, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, const char*>(SIMCALL_SET_CATEGORY, synchro, category);
-}
-
 inline static void simcall_BODY_run_kernel(std::function<void()> const* code)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
 inline static void simcall_BODY_run_kernel(std::function<void()> const* code)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
index fa3e71d..00a2489 100644 (file)
@@ -46,7 +46,6 @@ typedef enum {
   SIMCALL_STORAGE_READ,
   SIMCALL_STORAGE_WRITE,
   SIMCALL_MC_RANDOM,
   SIMCALL_STORAGE_READ,
   SIMCALL_STORAGE_WRITE,
   SIMCALL_MC_RANDOM,
-  SIMCALL_SET_CATEGORY,
   SIMCALL_RUN_KERNEL,
   SIMCALL_RUN_BLOCKING,
   NUM_SIMCALLS
   SIMCALL_RUN_KERNEL,
   SIMCALL_RUN_BLOCKING,
   NUM_SIMCALLS
index ea1765c..cdbe9ad 100644 (file)
@@ -55,7 +55,6 @@ const char* simcall_names[] = {
     "SIMCALL_STORAGE_READ",
     "SIMCALL_STORAGE_WRITE",
     "SIMCALL_MC_RANDOM",
     "SIMCALL_STORAGE_READ",
     "SIMCALL_STORAGE_WRITE",
     "SIMCALL_MC_RANDOM",
-    "SIMCALL_SET_CATEGORY",
     "SIMCALL_RUN_KERNEL",
     "SIMCALL_RUN_BLOCKING",
 };
     "SIMCALL_RUN_KERNEL",
     "SIMCALL_RUN_BLOCKING",
 };
@@ -197,11 +196,6 @@ case SIMCALL_MC_RANDOM:
   SIMIX_simcall_answer(simcall);
   break;
 
   SIMIX_simcall_answer(simcall);
   break;
 
-case SIMCALL_SET_CATEGORY:
-  SIMIX_set_category(simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]), simgrid::simix::unmarshal<const char*>(simcall->args[1]));
-  SIMIX_simcall_answer(simcall);
-  break;
-
 case SIMCALL_RUN_KERNEL:
   SIMIX_run_kernel(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
   SIMIX_simcall_answer(simcall);
 case SIMCALL_RUN_KERNEL:
   SIMIX_run_kernel(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
   SIMIX_simcall_answer(simcall);
index c72d961..d5f72d8 100644 (file)
@@ -69,7 +69,6 @@ sg_size_t   storage_read(surf_storage_t st, sg_size_t size) [[block]];
 sg_size_t   storage_write(surf_storage_t st, sg_size_t size) [[block]];
 
 int        mc_random(int min, int max);
 sg_size_t   storage_write(surf_storage_t st, sg_size_t size) [[block]];
 
 int        mc_random(int min, int max);
-void       set_category(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> synchro, const char* category) [[nohandler]];
 
 void       run_kernel(std::function<void()> const* code) [[nohandler]];
 void       run_blocking(std::function<void()> const* code) [[block,nohandler]];
 
 void       run_kernel(std::function<void()> const* code) [[nohandler]];
 void       run_blocking(std::function<void()> const* code) [[block,nohandler]];