X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/831de10adaaf8910940aa280e2ac2dd075b5ffe5..aad6508d97c47103669dec38517d206ede703fc2:/src/kernel/activity/SynchroIo.cpp diff --git a/src/kernel/activity/SynchroIo.cpp b/src/kernel/activity/SynchroIo.cpp index 05a7245e52..30e5cdd119 100644 --- a/src/kernel/activity/SynchroIo.cpp +++ b/src/kernel/activity/SynchroIo.cpp @@ -4,34 +4,33 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/activity/SynchroIo.hpp" -#include "src/surf/surf_interface.hpp" -#include "src/simix/popping_private.h" #include "src/simix/smx_private.h" +#include "src/surf/FileImpl.hpp" +#include "src/surf/surf_interface.hpp" -void simgrid::simix::Io::suspend() +void simgrid::kernel::activity::IoImpl::suspend() { if (surf_io) surf_io->suspend(); } -void simgrid::simix::Io::resume() +void simgrid::kernel::activity::IoImpl::resume() { if (surf_io) surf_io->resume(); } -void simgrid::simix::Io::post() +void simgrid::kernel::activity::IoImpl::post() { for (smx_simcall_t simcall : simcalls) { switch (simcall->call) { case SIMCALL_FILE_OPEN: { - smx_file_t tmp = xbt_new(s_smx_file_t,1); - tmp->surf_file = surf_storage_action_get_file(surf_io); + surf_file_t tmp = surf_storage_action_get_file(surf_io); simcall_file_open__set__result(simcall, tmp); break; } case SIMCALL_FILE_CLOSE: - xbt_free(simcall_file_close__get__fd(simcall)); + delete simcall_file_close__get__fd(simcall); simcall_file_close__set__result(simcall, 0); break; case SIMCALL_FILE_WRITE: