Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics (codefactor+coding style)
[simgrid.git] / src / kernel / activity / ConditionVariableImpl.hpp
index 9927841..0095699 100644 (file)
@@ -3,11 +3,11 @@
 /* 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 SIMGRID_KERNEL_ACTIVITY_CONDITIONVARIABLEIMPL_HPP
-#define SIMGRID_KERNEL_ACTIVITY_CONDITIONVARIABLEIMPL_HPP
+#ifndef SIMGRID_KERNEL_ACTIVITY_CONDITIONVARIABLE_HPP
+#define SIMGRID_KERNEL_ACTIVITY_CONDITIONVARIABLE_HPP
 
 #include "simgrid/s4u/ConditionVariable.hpp"
-#include "src/simix/ActorImpl.hpp"
+#include "src/kernel/actor/ActorImpl.hpp"
 #include <boost/intrusive/list.hpp>
 
 namespace simgrid {
@@ -19,12 +19,13 @@ public:
   ConditionVariableImpl();
   ~ConditionVariableImpl();
 
-  simgrid::kernel::actor::SynchroList sleeping; /* list of sleeping processes */
-  smx_mutex_t mutex = nullptr;
-  simgrid::s4u::ConditionVariable cond_;
+  actor::SynchroList sleeping_; /* list of sleeping processes */
+  MutexImpl* mutex_ = nullptr;
+  s4u::ConditionVariable cond_;
 
   void broadcast();
   void signal();
+  void wait(MutexImpl* mutex, double timeout, actor::ActorImpl* issuer);
 
 private:
   std::atomic_int_fast32_t refcount_{1};