X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/078a96e4b84369c23073bb68e15273030e9a357b..19aa33ec87e87e1ed8f4742cc4dd60aedb837892:/src/kernel/activity/SynchroRaw.hpp diff --git a/src/kernel/activity/SynchroRaw.hpp b/src/kernel/activity/SynchroRaw.hpp index d11a996443..b4ed3931c6 100644 --- a/src/kernel/activity/SynchroRaw.hpp +++ b/src/kernel/activity/SynchroRaw.hpp @@ -1,13 +1,14 @@ -/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2021. 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. */ -#ifndef SIMIX_SYNCHRO_RAW_HPP -#define SIMIX_SYNCHRO_RAW_HPP +#ifndef SIMGRID_KERNEL_ACTIVITY_SYNCHRO_RAW_HPP +#define SIMGRID_KERNEL_ACTIVITY_SYNCHRO_RAW_HPP #include "src/kernel/activity/ActivityImpl.hpp" #include "surf/surf.hpp" +#include namespace simgrid { namespace kernel { @@ -17,14 +18,17 @@ namespace activity { class XBT_PUBLIC RawImpl : public ActivityImpl_T { sg_host_t host_ = nullptr; double timeout_ = -1; + std::function finish_callback_; public: + explicit RawImpl(const std::function& finish_callback) : finish_callback_(finish_callback) {} RawImpl& set_host(s4u::Host* host); - RawImpl& set_timeout(double timeout); + RawImpl& set_timeout(double timeout) override; RawImpl* start(); void suspend() override; void resume() override; + void cancel() override; void post() override; void finish() override; };