Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove smx_global.cpp
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Tue, 21 Sep 2021 14:20:37 +0000 (16:20 +0200)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Tue, 21 Sep 2021 14:20:51 +0000 (16:20 +0200)
MANIFEST.in
src/kernel/EngineImpl.cpp
src/kernel/actor/ActorImpl.cpp
src/s4u/s4u_Engine.cpp
src/simix/libsmx.cpp
src/simix/smx_global.cpp [deleted file]
tools/cmake/DefinePackages.cmake

index fe26eda..67381d9 100644 (file)
@@ -2443,7 +2443,6 @@ include src/simix/popping_private.hpp
 include src/simix/simcalls.in
 include src/simix/simcalls.py
 include src/simix/smx_context.cpp
-include src/simix/smx_global.cpp
 include src/smpi/bindings/smpi_f77.cpp
 include src/smpi/bindings/smpi_f77_coll.cpp
 include src/smpi/bindings/smpi_f77_comm.cpp
index 79c89e0..8f0b6ca 100644 (file)
@@ -621,3 +621,8 @@ void EngineImpl::run()
 }
 } // namespace kernel
 } // namespace simgrid
+
+void SIMIX_run() // XBT_ATTRIB_DEPRECATED_v332
+{
+  simgrid::kernel::EngineImpl::get_instance()->run();
+}
index 93549a5..dbc2a55 100644 (file)
@@ -526,8 +526,7 @@ void create_maestro(const std::function<void()>& code)
 } // namespace kernel
 } // namespace simgrid
 
-/* needs to be public and without simcall because it is called
-   by exceptions and logging events */
+/* needs to be public and without simcall because it is called by exceptions and logging events */
 const char* SIMIX_process_self_get_name()
 {
   return SIMIX_is_maestro() ? "maestro" : simgrid::kernel::actor::ActorImpl::self()->get_cname();
@@ -538,3 +537,9 @@ smx_actor_t SIMIX_process_from_PID(aid_t pid) // XBT_ATTRIB_DEPRECATD_v331
 {
   return simgrid::kernel::actor::ActorImpl::by_pid(pid);
 }
+
+int SIMIX_is_maestro()
+{
+  const auto* self = simgrid::kernel::actor::ActorImpl::self();
+  return self == nullptr || simgrid::kernel::EngineImpl::get_instance()->is_maestro(self);
+}
index d28233b..30c6367 100644 (file)
@@ -461,6 +461,11 @@ Engine* Engine::set_default_comm_data_copy_callback(void (*callback)(kernel::act
 } // namespace s4u
 } // namespace simgrid
 
+double SIMIX_get_clock() // XBT_ATTRIB_DEPRECATED_v332
+{
+  return simgrid::s4u::Engine::get_clock();
+}
+
 /* **************************** Public C interface *************************** */
 void simgrid_init(int* argc, char** argv)
 {
index 57b965c..9026d32 100644 (file)
@@ -28,6 +28,7 @@
 #include <boost/core/demangle.hpp>
 #include <string>
 #include <typeinfo>
+XBT_LOG_NEW_CATEGORY(simix, "All SIMIX categories");
 
 /**
  * @ingroup simix_host_management
diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp
deleted file mode 100644 (file)
index 2c158ce..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* 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. */
-
-#include "simgrid/s4u/Engine.hpp"
-#include "src/kernel/EngineImpl.hpp"
-
-XBT_LOG_NEW_CATEGORY(simix, "All SIMIX categories");
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_kernel, simix, "Logging specific to SIMIX (kernel)");
-
-/**
- * @ingroup SIMIX_API
- * @brief A clock (in second).
- *
- * @return Return the clock.
- */
-double SIMIX_get_clock() // XBT_ATTRIB_DEPRECATED_v332
-{
-  return simgrid::s4u::Engine::get_clock();
-}
-
-void SIMIX_run() // XBT_ATTRIB_DEPRECATED_v332
-{
-  simgrid::kernel::EngineImpl::get_instance()->run();
-}
-
-int SIMIX_is_maestro()
-{
-  const simgrid::kernel::actor::ActorImpl* self = SIMIX_process_self();
-  return self == nullptr || simgrid::kernel::EngineImpl::get_instance()->is_maestro(self);
-}
index ef3d323..dfb9e35 100644 (file)
@@ -399,7 +399,6 @@ set(SIMIX_SRC
   src/kernel/context/ContextSwapped.hpp
   src/kernel/context/ContextThread.cpp
   src/kernel/context/ContextThread.hpp
-  src/simix/smx_global.cpp
   src/simix/popping.cpp
   src/kernel/activity/ActivityImpl.cpp
   src/kernel/activity/ActivityImpl.hpp