X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ef40de9569d6b74e953808d9f9eb3095aa7c38ab..2df88396d94796a341f1dbaa1d41f3162745d927:/src/xbt/OsSemaphore.hpp diff --git a/src/xbt/OsSemaphore.hpp b/src/xbt/OsSemaphore.hpp index 64598509d8..e8bc29bbbd 100644 --- a/src/xbt/OsSemaphore.hpp +++ b/src/xbt/OsSemaphore.hpp @@ -3,6 +3,8 @@ /* 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. */ +#include + #include #include @@ -10,12 +12,12 @@ namespace simgrid { namespace xbt { class XBT_PUBLIC OsSemaphore { public: - inline OsSemaphore(unsigned int uiCount) : capa_(uiCount) {} + explicit inline OsSemaphore(unsigned int capa) : capa_(capa) {} inline void acquire() { std::unique_lock lock(mutex_); - condition_.wait(lock, [&]() -> bool { return capa_ > 0; }); + condition_.wait(lock, [this]() { return capa_ > 0; }); --capa_; }