Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / src / kernel / activity / SemaphoreImpl.hpp
index 6053af5..73faa7b 100644 (file)
@@ -10,7 +10,7 @@
 #include <boost/intrusive/list.hpp>
 
 #include "simgrid/s4u/Semaphore.hpp"
-#include "src/simix/ActorImpl.hpp"
+#include "src/kernel/actor/ActorImpl.hpp"
 
 namespace simgrid {
 namespace kernel {
@@ -24,8 +24,9 @@ public:
   SemaphoreImpl(SemaphoreImpl const&) = delete;
   SemaphoreImpl& operator=(SemaphoreImpl const&) = delete;
 
+  void acquire(actor::ActorImpl* issuer, double timeout);
   void release();
-  bool would_block() { return (value_ <= 0); }
+  bool would_block() { return (value_ == 0); }
   unsigned int get_capacity() { return value_; }
 
   friend void intrusive_ptr_add_ref(SemaphoreImpl* sem)