*/
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]
#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"
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);
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);
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);
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);
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);
}