-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */
/* 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. */
// Already in the queue
}
}
+void BarrierAcquisitionImpl::post()
+{
+ finish();
+}
+
void BarrierAcquisitionImpl::finish()
{
xbt_assert(simcalls_.size() == 1, "Unexpected number of simcalls waiting: %zu", simcalls_.size());
for (auto const& acqui : ongoing_acquisitions_) {
acqui->granted_ = true;
if (acqui == acqui->get_issuer()->waiting_synchro_)
- acqui->finish();
+ acqui->post();
// else, the issuer is not blocked on this acquisition so no need to release it
}
ongoing_acquisitions_.clear(); // Rearm the barier for subsequent uses