Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill an unused function
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 25 Mar 2018 15:59:38 +0000 (17:59 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 25 Mar 2018 15:59:41 +0000 (17:59 +0200)
The prototype was s::k::actor::set_maestro while its declaration was
simgrid::simix::set_maestro (since one commit), proving that it's not
used.

The used function is SIMIX_set_maestro(), which should be converted
to C++ for sure, but I'm not sure yet of how to do it properly.

src/simix/ActorImpl.hpp
src/simix/smx_global.cpp

index f80b0e6..c2449fb 100644 (file)
@@ -129,7 +129,6 @@ typedef boost::intrusive::list<ActorImpl, boost::intrusive::member_hook<ActorImp
                                                                         &ActorImpl::smx_synchro_hook>>
     SynchroList;
 
                                                                         &ActorImpl::smx_synchro_hook>>
     SynchroList;
 
-XBT_PUBLIC void set_maestro(std::function<void()> code);
 XBT_PUBLIC void create_maestro(std::function<void()> code);
 }
 } // namespace kernel
 XBT_PUBLIC void create_maestro(std::function<void()> code);
 }
 } // namespace kernel
index 809323c..adcb65e 100644 (file)
@@ -169,21 +169,16 @@ static void kill_process(smx_actor_t process)
   SIMIX_process_kill(process, nullptr);
 }
 
   SIMIX_process_kill(process, nullptr);
 }
 
-static std::function<void()> maestro_code;
 
 namespace simgrid {
 namespace simix {
 
 simgrid::xbt::signal<void()> onDeadlock;
 
 
 namespace simgrid {
 namespace simix {
 
 simgrid::xbt::signal<void()> onDeadlock;
 
-XBT_PUBLIC void set_maestro(std::function<void()> code)
-{
-  maestro_code = std::move(code);
-}
-
 }
 }
 
 }
 }
 
+static std::function<void()> maestro_code;
 void SIMIX_set_maestro(void (*code)(void*), void* data)
 {
 #ifdef _WIN32
 void SIMIX_set_maestro(void (*code)(void*), void* data)
 {
 #ifdef _WIN32
@@ -195,9 +190,6 @@ void SIMIX_set_maestro(void (*code)(void*), void* data)
 /**
  * \ingroup SIMIX_API
  * \brief Initialize SIMIX internal data.
 /**
  * \ingroup SIMIX_API
  * \brief Initialize SIMIX internal data.
- *
- * \param argc Argc
- * \param argv Argv
  */
 void SIMIX_global_init(int *argc, char **argv)
 {
  */
 void SIMIX_global_init(int *argc, char **argv)
 {