Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
uniformization
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 10 May 2017 11:20:10 +0000 (13:20 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 10 May 2017 11:20:10 +0000 (13:20 +0200)
include/simgrid/simix.h
src/include/surf/surf.h
src/msg/msg_io.cpp
src/simix/smx_io.cpp
src/surf/surf_c_bindings.cpp
src/surf/surf_interface.hpp

index e06f54f..c101d43 100644 (file)
@@ -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(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);
 
 /************************** MC simcalls   **********************************/
 XBT_PUBLIC(int) simcall_mc_random(int min, int max);
 
index 6cf5b49..09941a4 100644 (file)
@@ -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);
  * 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);
 
 /** @} */
 
 
 /** @} */
 
index 282f46a..060e256 100644 (file)
@@ -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);
 
 {
   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);
 
   storage_private->hostname = surf_storage_get_host(storage);
   storage_private->size     = surf_storage_get_size(storage);
 
index 7592261..38659ca 100644 (file)
@@ -180,10 +180,6 @@ xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){
   return surf_storage_get_properties(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<simgrid::kernel::activity::Io*>(synchro);
 void SIMIX_io_destroy(smx_activity_t synchro)
 {
   simgrid::kernel::activity::Io *io = static_cast<simgrid::kernel::activity::Io*>(synchro);
index e57d90b..7840806 100644 (file)
@@ -227,6 +227,10 @@ const char* surf_storage_get_host(surf_resource_t resource){
   return static_cast<simgrid::surf::Storage*>(surf_storage_resource_priv(resource))->attach_;
 }
 
   return static_cast<simgrid::surf::Storage*>(surf_storage_resource_priv(resource))->attach_;
 }
 
+const char* surf_storage_get_name(surf_resource_t resource){
+  return static_cast<simgrid::surf::Storage*>(surf_storage_resource_priv(resource))->cname();
+}
+
 void surf_cpu_action_set_bound(surf_action_t action, double bound) {
   static_cast<simgrid::surf::CpuAction*>(action)->setBound(bound);
 }
 void surf_cpu_action_set_bound(surf_action_t action, double bound) {
   static_cast<simgrid::surf::CpuAction*>(action)->setBound(bound);
 }
index a5987f5..25bc6fc 100644 (file)
@@ -52,10 +52,6 @@ extern XBT_PRIVATE simgrid::xbt::signal<void(void)> surfExitCallbacks;
 
 int XBT_PRIVATE __surf_is_absolute_file_path(const char *file_path);
 
 
 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 *
  ***********/
 /***********
  * Classes *
  ***********/