Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 10 Jul 2017 07:09:07 +0000 (09:09 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 10 Jul 2017 07:09:07 +0000 (09:09 +0200)
src/include/surf/surf.h
src/simix/smx_io.cpp
src/simix/smx_io_private.h
src/surf/surf_c_bindings.cpp

index d691b54..fa9a396 100644 (file)
@@ -138,27 +138,6 @@ XBT_PUBLIC(surf_action_t) surf_model_extract_failed_action_set(surf_model_t mode
  */
 XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model);
 
-/** @brief Create a file closing action on the given host */
-XBT_PUBLIC(surf_action_t) surf_host_close(sg_host_t host, surf_file_t fd);
-
-/** @brief Create a file reading action on the given host */
-XBT_PUBLIC(surf_action_t) surf_host_read(sg_host_t host, surf_file_t fd, sg_size_t size);
-
-/** @brief Create a file writing action on the given host  */
-XBT_PUBLIC(surf_action_t) surf_host_write(sg_host_t host, surf_file_t fd, sg_size_t size);
-
-/**
- * @brief Move a file to another location on the *same mount point*.
- * @details [long description]
- *
- * @param host The surf host
- * @param fd The file descriptor
- * @param fullpath The new full path
- *
- * @return MSG_OK if successful, otherwise MSG_TASK_CANCELED
- */
-XBT_PUBLIC(int) surf_host_file_move(sg_host_t host, surf_file_t fd, const char* fullpath);
-
 /**
  * @brief [brief description]
  * @details [long description]
index cfd7f33..5bc58f7 100644 (file)
@@ -6,16 +6,14 @@
 #include <xbt/ex.hpp>
 #include <xbt/sysdep.h>
 #include <xbt/log.h>
-#include <xbt/dict.h>
 
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/Storage.hpp"
 #include "src/surf/FileImpl.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "src/surf/StorageImpl.hpp"
 #include "surf/surf.h"
 
-#include <mc/mc.h>
-
 #include "src/surf/surf_interface.hpp"
 #include "smx_private.h"
 
@@ -39,7 +37,7 @@ smx_activity_t SIMIX_file_read(surf_file_t file, sg_size_t size, sg_host_t host)
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
   synchro->host = host;
-  synchro->surf_io                           = surf_host_read(host, file, size);
+  synchro->surf_io                           = host->pimpl_->read(file, size);
 
   synchro->surf_io->setData(synchro);
   XBT_DEBUG("Create io synchro %p", synchro);
@@ -62,7 +60,7 @@ smx_activity_t SIMIX_file_write(surf_file_t file, sg_size_t size, sg_host_t host
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
   synchro->host = host;
-  synchro->surf_io                           = surf_host_write(host, file, size);
+  synchro->surf_io                           = host->pimpl_->write(file, size);
   synchro->surf_io->setData(synchro);
   XBT_DEBUG("Create io synchro %p", synchro);
 
@@ -106,7 +104,7 @@ smx_activity_t SIMIX_file_close(surf_file_t file, sg_host_t host)
 
   simgrid::kernel::activity::IoImpl* synchro = new simgrid::kernel::activity::IoImpl();
   synchro->host = host;
-  synchro->surf_io                           = surf_host_close(host, file);
+  synchro->surf_io                           = host->pimpl_->close(file);
   synchro->surf_io->setData(synchro);
   XBT_DEBUG("Create io synchro %p", synchro);
 
index 13f8145..e4689f7 100644 (file)
@@ -15,8 +15,6 @@ XBT_PRIVATE smx_activity_t SIMIX_file_read(surf_file_t fd, sg_size_t size, sg_ho
 XBT_PRIVATE smx_activity_t SIMIX_file_write(surf_file_t fd, sg_size_t size, sg_host_t host);
 XBT_PRIVATE smx_activity_t SIMIX_file_open(const char* mount, const char* path, sg_storage_t st);
 XBT_PRIVATE smx_activity_t SIMIX_file_close(surf_file_t fd, sg_host_t host);
-XBT_PRIVATE int SIMIX_file_unlink(surf_file_t fd, sg_host_t host);
-XBT_PRIVATE int SIMIX_file_move(smx_actor_t process, surf_file_t fd, const char* fullpath);
 
 XBT_PRIVATE void SIMIX_io_destroy(smx_activity_t synchro);
 XBT_PRIVATE void SIMIX_io_finish(smx_activity_t synchro);
index ab9f20b..9ca5f1d 100644 (file)
@@ -165,18 +165,6 @@ int surf_model_running_action_set_size(surf_model_t model){
   return model->getRunningActionSet()->size();
 }
 
-surf_action_t surf_host_close(sg_host_t host, surf_file_t fd){
-  return host->pimpl_->close(fd);
-}
-
-surf_action_t surf_host_read(sg_host_t host, surf_file_t fd, sg_size_t size){
-  return host->pimpl_->read(fd, size);
-}
-
-surf_action_t surf_host_write(sg_host_t host, surf_file_t fd, sg_size_t size){
-  return host->pimpl_->write(fd, size);
-}
-
 void surf_cpu_action_set_bound(surf_action_t action, double bound) {
   static_cast<simgrid::surf::CpuAction*>(action)->setBound(bound);
 }