From 5b52e25dc0e3d17cdbe0323f922d7bb4fc238af3 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Wed, 10 May 2017 13:20:10 +0200 Subject: [PATCH 1/1] uniformization --- include/simgrid/simix.h | 2 -- src/include/surf/surf.h | 1 + src/msg/msg_io.cpp | 2 +- src/simix/smx_io.cpp | 4 ---- src/surf/surf_c_bindings.cpp | 4 ++++ src/surf/surf_interface.hpp | 4 ---- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index e06f54f307..c101d43a2b 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -369,8 +369,6 @@ XBT_PUBLIC(int) simcall_file_seek(smx_file_t fd, sg_offset_t offset, int origin) XBT_PUBLIC(int) simcall_file_move(smx_file_t fd, const char* fullpath); /***************************** Storage **********************************/ XBT_PUBLIC(xbt_dict_t) simcall_storage_get_properties(smx_storage_t storage); -XBT_PUBLIC(const char*) SIMIX_storage_get_name(smx_storage_t storage); - /************************** MC simcalls **********************************/ XBT_PUBLIC(int) simcall_mc_random(int min, int max); diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 6cf5b49f67..09941a4c09 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -322,6 +322,7 @@ XBT_PUBLIC(xbt_dict_t) surf_storage_action_get_ls_dict(surf_action_t action); * may not exist. */ XBT_PUBLIC(const char * ) surf_storage_get_host(surf_resource_t resource); +XBT_PUBLIC(const char * ) surf_storage_get_name(surf_resource_t resource); /** @} */ diff --git a/src/msg/msg_io.cpp b/src/msg/msg_io.cpp index 282f46ace7..060e256413 100644 --- a/src/msg/msg_io.cpp +++ b/src/msg/msg_io.cpp @@ -421,7 +421,7 @@ msg_storage_t __MSG_storage_create(smx_storage_t storage) { msg_storage_priv_t storage_private = xbt_new0(s_msg_storage_priv_t, 1); - storage_private->name = SIMIX_storage_get_name(storage); + storage_private->name = surf_storage_get_name(storage); storage_private->hostname = surf_storage_get_host(storage); storage_private->size = surf_storage_get_size(storage); diff --git a/src/simix/smx_io.cpp b/src/simix/smx_io.cpp index 759226131b..38659cae08 100644 --- a/src/simix/smx_io.cpp +++ b/src/simix/smx_io.cpp @@ -180,10 +180,6 @@ xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){ return surf_storage_get_properties(storage); } -const char* SIMIX_storage_get_name(smx_storage_t storage){ - return sg_storage_name(storage); -} - void SIMIX_io_destroy(smx_activity_t synchro) { simgrid::kernel::activity::Io *io = static_cast(synchro); diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index e57d90b6a8..7840806932 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -227,6 +227,10 @@ const char* surf_storage_get_host(surf_resource_t resource){ return static_cast(surf_storage_resource_priv(resource))->attach_; } +const char* surf_storage_get_name(surf_resource_t resource){ + return static_cast(surf_storage_resource_priv(resource))->cname(); +} + void surf_cpu_action_set_bound(surf_action_t action, double bound) { static_cast(action)->setBound(bound); } diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index a5987f592d..25bc6fceb8 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -52,10 +52,6 @@ extern XBT_PRIVATE simgrid::xbt::signal surfExitCallbacks; int XBT_PRIVATE __surf_is_absolute_file_path(const char *file_path); -static inline char* sg_storage_name(sg_storage_t storage) { - return storage->key; -} - /*********** * Classes * ***********/ -- 2.20.1