Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define ActivityImpl::set_timeout().
[simgrid.git] / src / kernel / activity / SynchroRaw.hpp
index a1d4ca3..8ff877e 100644 (file)
@@ -1,10 +1,10 @@
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2020. 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"
@@ -14,17 +14,18 @@ namespace kernel {
 namespace activity {
 
   /** Used to implement mutexes, semaphores and conditions */
-class XBT_PUBLIC RawImpl : public ActivityImpl {
+class XBT_PUBLIC RawImpl : public ActivityImpl_T<RawImpl> {
   sg_host_t host_ = nullptr;
   double timeout_ = -1;
 
 public:
   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;
 };