A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rely on template argument deduction (sonar, c++17).
[simgrid.git]
/
src
/
xbt
/
OsSemaphore.hpp
diff --git
a/src/xbt/OsSemaphore.hpp
b/src/xbt/OsSemaphore.hpp
index
47a946c
..
b29a665
100644
(file)
--- a/
src/xbt/OsSemaphore.hpp
+++ b/
src/xbt/OsSemaphore.hpp
@@
-16,14
+16,14
@@
public:
inline void acquire()
{
inline void acquire()
{
- std::unique_lock
<std::mutex>
lock(mutex_);
+ std::unique_lock lock(mutex_);
condition_.wait(lock, [this]() { return capa_ > 0; });
--capa_;
}
inline void release()
{
condition_.wait(lock, [this]() { return capa_ > 0; });
--capa_;
}
inline void release()
{
- std::unique_lock
<std::mutex>
lock(mutex_);
+ std::unique_lock lock(mutex_);
++capa_;
condition_.notify_one();
}
++capa_;
condition_.notify_one();
}