From: Gabriel Corona Date: Wed, 25 Nov 2015 08:42:08 +0000 (+0100) Subject: [surf] Switch sg_platf to C++ X-Git-Tag: v3_13~1550 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8d45d82d6394d07db6cdd4462c7172a53dc8185f [surf] Switch sg_platf to C++ Because we need it for the next commit. --- diff --git a/src/surf/sg_platf.c b/src/surf/sg_platf.cpp similarity index 99% rename from src/surf/sg_platf.c rename to src/surf/sg_platf.cpp index 504e9e37a4..5425bc1366 100644 --- a/src/surf/sg_platf.c +++ b/src/surf/sg_platf.cpp @@ -11,7 +11,10 @@ #include "xbt/RngStream.h" #include "simgrid/platf_interface.h" +extern "C" { XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse); +} + xbt_dynar_t sg_platf_host_cb_list = NULL; // of sg_platf_host_cb_t xbt_dynar_t sg_platf_host_link_cb_list = NULL; // of sg_platf_host_link_cb_t xbt_dynar_t sg_platf_link_cb_list = NULL; // of sg_platf_link_cb_t @@ -46,7 +49,7 @@ xbt_dynar_t sg_platf_gpu_cb_list = NULL; /* ***************************************** */ -static int surf_parse_models_setup_already_called; +static int surf_parse_models_setup_already_called = 0; /* one RngStream for the platform, to respect some statistic rules */ static RngStream sg_platf_rng_stream = NULL; @@ -299,8 +302,6 @@ void sg_platf_end() { } } -static int surf_parse_models_setup_already_called = 0; - void sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS) { unsigned int iterator; sg_platf_AS_cb_t fun; diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index e0bcf1f8db..a1d50a389c 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -323,7 +323,7 @@ set(SURF_SRC src/surf/platf_generator.c src/surf/plugins/energy.cpp src/surf/random_mgr.c - src/surf/sg_platf.c + src/surf/sg_platf.cpp src/surf/storage_interface.cpp src/surf/storage_n11.cpp src/surf/surf_c_bindings.cpp