Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename smx_synchro_t to smx_activity_t
[simgrid.git] / src / simix / smx_io.cpp
index 8b2818c..9f15b73 100644 (file)
@@ -16,7 +16,7 @@
 #include "src/surf/surf_interface.hpp"
 #include "smx_private.h"
 
-#include "src/synchro/SynchroIo.hpp"
+#include "src/kernel/activity/SynchroIo.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_io, simix, "Logging specific to SIMIX (io)");
 
@@ -58,19 +58,19 @@ void SIMIX_storage_destroy(void *s)
 //SIMIX FILE READ
 void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, sg_host_t host)
 {
-  smx_synchro_t synchro = SIMIX_file_read(fd, size, host);
+  smx_activity_t synchro = SIMIX_file_read(fd, size, host);
   synchro->simcalls.push_back(simcall);
   simcall->issuer->waiting_synchro = synchro;
 }
 
-smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, sg_host_t host)
+smx_activity_t SIMIX_file_read(smx_file_t fd, sg_size_t size, sg_host_t host)
 {
   /* check if the host is active */
   if (host->isOff())
     THROWF(host_error, 0, "Host %s failed, you cannot call this function", sg_host_get_name(host));
 
 
-  simgrid::simix::Io *synchro = new simgrid::simix::Io();
+  simgrid::kernel::activity::Io *synchro = new simgrid::kernel::activity::Io();
   synchro->host = host;
   synchro->surf_io = surf_host_read(host, fd->surf_file, size);
 
@@ -83,17 +83,17 @@ smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, sg_host_t host)
 //SIMIX FILE WRITE
 void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, sg_host_t host)
 {
-  smx_synchro_t synchro = SIMIX_file_write(fd,  size, host);
+  smx_activity_t synchro = SIMIX_file_write(fd,  size, host);
   synchro->simcalls.push_back(simcall);
   simcall->issuer->waiting_synchro = synchro;
 }
 
-smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, sg_host_t host)
+smx_activity_t SIMIX_file_write(smx_file_t fd, sg_size_t size, sg_host_t host)
 {
   if (host->isOff())
     THROWF(host_error, 0, "Host %s failed, you cannot call this function", sg_host_get_name(host));
 
-  simgrid::simix::Io *synchro = new simgrid::simix::Io();
+  simgrid::kernel::activity::Io *synchro = new simgrid::kernel::activity::Io();
   synchro->host = host;
   synchro->surf_io = surf_host_write(host, fd->surf_file, size);
   synchro->surf_io->setData(synchro);
@@ -105,17 +105,17 @@ smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, sg_host_t host)
 //SIMIX FILE OPEN
 void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, sg_host_t host)
 {
-  smx_synchro_t synchro = SIMIX_file_open(fullpath, host);
+  smx_activity_t synchro = SIMIX_file_open(fullpath, host);
   synchro->simcalls.push_back(simcall);
   simcall->issuer->waiting_synchro = synchro;
 }
 
-smx_synchro_t SIMIX_file_open(const char* fullpath, sg_host_t host)
+smx_activity_t SIMIX_file_open(const char* fullpath, sg_host_t host)
 {
   if (host->isOff())
     THROWF(host_error, 0, "Host %s failed, you cannot call this function", sg_host_get_name(host));
 
-  simgrid::simix::Io *synchro = new simgrid::simix::Io();
+  simgrid::kernel::activity::Io *synchro = new simgrid::kernel::activity::Io();
   synchro->host = host;
   synchro->surf_io = surf_host_open(host, fullpath);
   synchro->surf_io->setData(synchro);
@@ -127,17 +127,17 @@ smx_synchro_t SIMIX_file_open(const char* fullpath, sg_host_t host)
 //SIMIX FILE CLOSE
 void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, sg_host_t host)
 {
-  smx_synchro_t synchro = SIMIX_file_close(fd, host);
+  smx_activity_t synchro = SIMIX_file_close(fd, host);
   synchro->simcalls.push_back(simcall);
   simcall->issuer->waiting_synchro = synchro;
 }
 
-smx_synchro_t SIMIX_file_close(smx_file_t fd, sg_host_t host)
+smx_activity_t SIMIX_file_close(smx_file_t fd, sg_host_t host)
 {
   if (host->isOff())
     THROWF(host_error, 0, "Host %s failed, you cannot call this function", sg_host_get_name(host));
 
-  simgrid::simix::Io *synchro = new simgrid::simix::Io();
+  simgrid::kernel::activity::Io *synchro = new simgrid::kernel::activity::Io();
   synchro->host = host;
   synchro->surf_io = surf_host_close(host, fd->surf_file);
   synchro->surf_io->setData(synchro);
@@ -253,16 +253,16 @@ const char* SIMIX_storage_get_host(smx_storage_t storage){
   return surf_storage_get_host(storage);
 }
 
-void SIMIX_io_destroy(smx_synchro_t synchro)
+void SIMIX_io_destroy(smx_activity_t synchro)
 {
-  simgrid::simix::Io *io = static_cast<simgrid::simix::Io*>(synchro);
+  simgrid::kernel::activity::Io *io = static_cast<simgrid::kernel::activity::Io*>(synchro);
   XBT_DEBUG("Destroy synchro %p", synchro);
   if (io->surf_io)
     io->surf_io->unref();
   delete io;
 }
 
-void SIMIX_io_finish(smx_synchro_t synchro)
+void SIMIX_io_finish(smx_activity_t synchro)
 {
   for (smx_simcall_t simcall : synchro->simcalls) {
     switch (synchro->state) {