Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
implement CRTP in kernel::activity
[simgrid.git] / src / kernel / activity / SynchroRaw.hpp
index d9a38c2..d11a996 100644 (file)
@@ -14,16 +14,22 @@ 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() override;
+  RawImpl& set_host(s4u::Host* host);
+  RawImpl& set_timeout(double timeout);
+
+  RawImpl* start();
   void suspend() override;
   void resume() override;
   void post() override;
-
-  simgrid::kernel::resource::Action* sleep = nullptr;
-  };
-
-}}} // namespace simgrid::kernel::activity
+  void finish() override;
+};
+} // namespace activity
+} // namespace kernel
+} // namespace simgrid
 
 #endif