Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #179 from Takishipp/signals
[simgrid.git] / src / kernel / activity / ActivityImpl.cpp
index 8506c1d..77e6570 100644 (file)
@@ -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;
 }