X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5ac4d2b6e654a1bbe13782569e401a875cb9aab6..fa194cfd4dc1694b23d8f5c4118005fa70a92db4:/src/kernel/activity/SemaphoreImpl.hpp diff --git a/src/kernel/activity/SemaphoreImpl.hpp b/src/kernel/activity/SemaphoreImpl.hpp index 6053af5561..73faa7baf5 100644 --- a/src/kernel/activity/SemaphoreImpl.hpp +++ b/src/kernel/activity/SemaphoreImpl.hpp @@ -10,7 +10,7 @@ #include #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)