X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4386010688d60bea7f54c2383aa9c923f2980948..1fb2f54c35266af4042c56102ec1ad27e2cab321:/src/simix/smx_io.cpp diff --git a/src/simix/smx_io.cpp b/src/simix/smx_io.cpp index eb041ecc8a..91690a9836 100644 --- a/src/simix/smx_io.cpp +++ b/src/simix/smx_io.cpp @@ -10,6 +10,7 @@ #include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Storage.hpp" +#include "src/surf/FileImpl.hpp" #include "src/surf/StorageImpl.hpp" #include @@ -120,37 +121,19 @@ int SIMIX_file_unlink(smx_file_t fd, sg_host_t host) return surf_host_unlink(host, fd->surf_file); } -sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd) +sg_size_t SIMIX_file_get_size(smx_file_t fd) { - return SIMIX_file_get_size(simcall->issuer, fd); + return fd->surf_file->size(); } -sg_size_t SIMIX_file_get_size(smx_actor_t process, smx_file_t fd) +sg_size_t SIMIX_file_tell(smx_file_t fd) { - sg_host_t host = process->host; - return surf_host_get_size(host, fd->surf_file); -} - -sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd) -{ - return SIMIX_file_tell(simcall->issuer, fd); -} - -sg_size_t SIMIX_file_tell(smx_actor_t process, smx_file_t fd) -{ - sg_host_t host = process->host; - return surf_host_file_tell(host, fd->surf_file); -} - -int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin) -{ - return SIMIX_file_seek(simcall->issuer, fd, offset, origin); + return fd->surf_file->tell(); } -int SIMIX_file_seek(smx_actor_t process, smx_file_t fd, sg_offset_t offset, int origin) +int SIMIX_file_seek(smx_file_t fd, sg_offset_t offset, int origin) { - sg_host_t host = process->host; - return surf_host_file_seek(host, fd->surf_file, offset, origin); + return fd->surf_file->seek(offset, origin); } int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t file, const char* fullpath)