]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/activity/SemaphoreImpl.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Specialize parameter for simcall comm_testany.
[simgrid.git] / src / kernel / activity / SemaphoreImpl.hpp
index 6053af5561b06927c332f1c7617f3ba9d08f0f0f..1b255a8fc1e527ed904694872eb0a16c604b38d3 100644 (file)
@@ -24,8 +24,9 @@ public:
   SemaphoreImpl(SemaphoreImpl const&) = delete;
   SemaphoreImpl& operator=(SemaphoreImpl const&) = delete;
 
+  void acquire(smx_actor_t 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)