Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this header is C++ only
[simgrid.git] / src / kernel / activity / SynchroIo.cpp
index 05a7245..30e5cdd 100644 (file)
@@ -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: