Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
migrate actors_to_run and actors_that_ran to EngineImpl
[simgrid.git] / src / simix / smx_private.hpp
index 18b0131..ddf9816 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -22,19 +22,16 @@ namespace simix {
 
 class Global {
 public:
-  bool execute_tasks();
   /**
    * Garbage collection
    *
    * Should be called some time to time to free the memory allocated for actors that have finished (or killed).
    */
   void empty_trash();
-  void run_all_actors();
+  void display_all_actor_status() const;
 
-  smx_context_factory_t context_factory = nullptr;
-  std::vector<smx_actor_t> actors_to_run;
-  std::vector<smx_actor_t> actors_that_ran;
-  std::map<aid_t, smx_actor_t> process_list;
+  kernel::context::ContextFactory* context_factory = nullptr;
+  std::map<aid_t, kernel::actor::ActorImpl*> process_list;
   boost::intrusive::list<kernel::actor::ActorImpl,
                          boost::intrusive::member_hook<kernel::actor::ActorImpl, boost::intrusive::list_member_hook<>,
                                                        &kernel::actor::ActorImpl::smx_destroy_list_hook>>
@@ -48,23 +45,12 @@ public:
    * That way, the MCer would not need to have the list of actors on its side.
    * These info could be published by the MCed to the MCer in a way inspired of vd.so
    */
-  xbt_dynar_t actors_vector      = xbt_dynar_new(sizeof(smx_actor_t), nullptr);
-  xbt_dynar_t dead_actors_vector = xbt_dynar_new(sizeof(smx_actor_t), nullptr);
+  xbt_dynar_t actors_vector      = xbt_dynar_new(sizeof(kernel::actor::ActorImpl*), nullptr);
+  xbt_dynar_t dead_actors_vector = xbt_dynar_new(sizeof(kernel::actor::ActorImpl*), nullptr);
 #endif
-  smx_actor_t maestro_process   = nullptr;
-
-  // Maps function names to actor code:
-  std::unordered_map<std::string, simgrid::simix::ActorCodeFactory> registered_functions;
-
-  // This might be used when no corresponding function name is registered:
-  simgrid::simix::ActorCodeFactory default_function;
+  kernel::actor::ActorImpl* maestro_ = nullptr;
 
   std::mutex mutex;
-
-  std::vector<simgrid::xbt::Task<void()>> tasks;
-  std::vector<simgrid::xbt::Task<void()>> tasksTemp;
-
-  std::vector<simgrid::kernel::actor::ActorImpl*> daemons;
 };
 }
 }