X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/334e868fd56cf359ef71557b7eba026687fbef73..48efae676c3604efffe21365b2d525e578fd22e5:/src/simix/SynchroRaw.cpp?ds=sidebyside diff --git a/src/simix/SynchroRaw.cpp b/src/simix/SynchroRaw.cpp index e73fe3d27c..872cf47b52 100644 --- a/src/simix/SynchroRaw.cpp +++ b/src/simix/SynchroRaw.cpp @@ -5,12 +5,28 @@ #include "src/simix/SynchroRaw.hpp" #include "src/surf/surf_interface.hpp" +#include "src/simix/smx_synchro_private.h" -void simgrid::simix::Raw::suspend() { +XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_synchro); + +void simgrid::simix::Raw::suspend() +{ /* The suspension of raw synchros is delayed to when the process is rescheduled. */ } -void simgrid::simix::Raw::resume() { +void simgrid::simix::Raw::resume() +{ /* I cannot resume raw synchros directly. This is delayed to when the process is rescheduled at * the end of the synchro. */ } +void simgrid::simix::Raw::post() +{ + XBT_IN("(%p)",this); + if (sleep->getState() == simgrid::surf::Action::State::failed) + state = SIMIX_FAILED; + else if(sleep->getState() == simgrid::surf::Action::State::done) + state = SIMIX_SRC_TIMEOUT; + + SIMIX_synchro_finish(this); + XBT_OUT(); +}