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
Set shared variable *before* mutex unlock.
[simgrid.git]
/
src
/
s4u
/
s4u_Barrier.cpp
diff --git
a/src/s4u/s4u_Barrier.cpp
b/src/s4u/s4u_Barrier.cpp
index
e4a8214
..
f1e449b
100644
(file)
--- a/
src/s4u/s4u_Barrier.cpp
+++ b/
src/s4u/s4u_Barrier.cpp
@@
-39,8
+39,8
@@
int Barrier::wait()
XBT_DEBUG("waiting %p %u/%u", this, arrived_actors_, expected_actors_);
if (arrived_actors_ == expected_actors_) {
cond_->notify_all();
- mutex_->unlock();
arrived_actors_ = 0;
+ mutex_->unlock();
return SG_BARRIER_SERIAL_THREAD;
}