X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/72bcdd6c079bd27b3e4e1e5a5552ca97a4f2bf19..148987a2fffe74a2a14294ea9ace78e5b9c8bbae:/src/kernel/activity/SynchroRaw.hpp diff --git a/src/kernel/activity/SynchroRaw.hpp b/src/kernel/activity/SynchroRaw.hpp index d416f90dd0..13953ead95 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. */ @@ -14,17 +14,23 @@ namespace kernel { namespace activity { /** Used to implement mutexes, semaphores and conditions */ -XBT_PUBLIC_CLASS RawImpl : public ActivityImpl -{ +class XBT_PUBLIC RawImpl : public ActivityImpl_T { + sg_host_t host_ = nullptr; + double timeout_ = -1; + public: - ~RawImpl() override; + RawImpl& set_host(s4u::Host* host); + RawImpl& set_timeout(double timeout); + + RawImpl* start(); void suspend() override; void resume() override; + void cancel() override; void post() override; - - surf_action_t sleep = nullptr; - }; - -}}} // namespace simgrid::kernel::activity + void finish() override; +}; +} // namespace activity +} // namespace kernel +} // namespace simgrid #endif