From: Frederic Suter Date: Wed, 20 Feb 2019 13:08:55 +0000 (+0100) Subject: move a function to a righter place X-Git-Tag: v3_22~284 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d4f45383d774dcee4a79b3ca281c6180b9005f04 move a function to a righter place --- diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index 16f419a05b..68698e80c1 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -7,6 +7,7 @@ #include "simgrid/s4u/Actor.hpp" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Exec.hpp" +#include "src/simix/smx_private.hpp" #include "src/surf/HostImpl.hpp" #include @@ -639,6 +640,16 @@ sg_host_t sg_host_self() return (process == nullptr) ? nullptr : process->get_host(); } +/* needs to be public and without simcall for exceptions and logging events */ +const char* sg_host_self_get_name() +{ + sg_host_t host = sg_host_self(); + if (host == nullptr || SIMIX_process_self() == simix_global->maestro_process) + return ""; + + return host->get_cname(); +} + double sg_host_load(sg_host_t host) { return host->get_load(); diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index c30ee976c9..37c3479b7b 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -13,16 +13,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix, "SIMIX hosts"); -/* needs to be public and without simcall for exceptions and logging events */ -const char* sg_host_self_get_name() -{ - sg_host_t host = sg_host_self(); - if (host == nullptr || SIMIX_process_self() == simix_global->maestro_process) - return ""; - - return host->get_cname(); -} - simgrid::kernel::activity::ExecImplPtr SIMIX_execution_parallel_start(std::string name, int host_nb, const sg_host_t* host_list, const double* flops_amount, const double* bytes_amount, double rate, double timeout)