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
Merge pull request #179 from Takishipp/signals
[simgrid.git]
/
src
/
kernel
/
activity
/
ActivityImpl.cpp
diff --git
a/src/kernel/activity/ActivityImpl.cpp
b/src/kernel/activity/ActivityImpl.cpp
index
8506c1d
..
77e6570
100644
(file)
--- a/
src/kernel/activity/ActivityImpl.cpp
+++ b/
src/kernel/activity/ActivityImpl.cpp
@@
-19,9
+19,7
@@
void simgrid::kernel::activity::ActivityImpl::unref()
{
xbt_assert(refcount_ > 0,
"This activity has a negative refcount! You can only call test() or wait() once per activity.");
-
- // Atomic operation! Do not split in two instructions!
- auto count = --refcount_;
- if (count == 0)
+ refcount_--;
+ if (refcount_ == 0)
delete this;
}