X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/51d099097598a993323850816311d3f78956e6a0..efe776a7f971fa0f6641baa5c835364604b600c8:/src/kernel/activity/SynchroRaw.cpp diff --git a/src/kernel/activity/SynchroRaw.cpp b/src/kernel/activity/SynchroRaw.cpp index 9326bd2239..5b3efd5c5a 100644 --- a/src/kernel/activity/SynchroRaw.cpp +++ b/src/kernel/activity/SynchroRaw.cpp @@ -7,17 +7,28 @@ #include "simgrid/kernel/resource/Action.hpp" #include "src/kernel/context/Context.hpp" #include "src/simix/smx_synchro_private.hpp" +#include "src/surf/cpu_interface.hpp" #include "src/surf/surf_interface.hpp" +#include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_synchro); + namespace simgrid { namespace kernel { namespace activity { +RawImpl* RawImpl::start(s4u::Host* host, double timeout) +{ + surf_action_ = host->pimpl_cpu->sleep(timeout); + surf_action_->set_data(this); + return this; +} + RawImpl::~RawImpl() { surf_action_->unref(); } + void RawImpl::suspend() { /* The suspension of raw synchros is delayed to when the process is rescheduled. */