X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9aa3a4378d516f0d92531f6f98a127c4a798386e..8b853cf697928f829717bb60bd9c1cadaf2beb8e:/src/kernel/activity/SynchroRaw.hpp diff --git a/src/kernel/activity/SynchroRaw.hpp b/src/kernel/activity/SynchroRaw.hpp index b85e06f638..a1d4ca3fc3 100644 --- a/src/kernel/activity/SynchroRaw.hpp +++ b/src/kernel/activity/SynchroRaw.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -6,24 +6,30 @@ #ifndef SIMIX_SYNCHRO_RAW_HPP #define SIMIX_SYNCHRO_RAW_HPP -#include "surf/surf.h" #include "src/kernel/activity/ActivityImpl.hpp" +#include "surf/surf.hpp" namespace simgrid { namespace kernel { namespace activity { /** Used to implement mutexes, semaphores and conditions */ - XBT_PUBLIC_CLASS Raw : public ActivityImpl { - public: - ~Raw() override; - void suspend() override; - void resume() override; - void post() override; - - surf_action_t sleep = nullptr; - }; - -}}} // namespace simgrid::kernel::activity +class XBT_PUBLIC RawImpl : public ActivityImpl { + sg_host_t host_ = nullptr; + double timeout_ = -1; + +public: + RawImpl& set_host(s4u::Host* host); + RawImpl& set_timeout(double timeout); + + RawImpl* start(); + void suspend() override; + void resume() override; + void post() override; + void finish() override; +}; +} // namespace activity +} // namespace kernel +} // namespace simgrid #endif