1 /* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "src/kernel/activity/SynchroIo.hpp"
7 #include "src/simix/smx_private.h"
8 #include "src/surf/surf_interface.hpp"
10 void simgrid::kernel::activity::IoImpl::suspend()
16 void simgrid::kernel::activity::IoImpl::resume()
22 void simgrid::kernel::activity::IoImpl::post()
24 for (smx_simcall_t const& simcall : simcalls) {
25 switch (simcall->call) {
26 case SIMCALL_FILE_WRITE:
27 simcall_file_write__set__result(simcall, surf_io->getCost());
29 case SIMCALL_FILE_READ:
30 simcall_file_read__set__result(simcall, surf_io->getCost());
37 switch (surf_io->getState()) {
38 case simgrid::surf::Action::State::failed:
41 case simgrid::surf::Action::State::done:
49 SIMIX_io_finish(this);