From: Martin Quinson Date: Mon, 13 Nov 2023 21:08:30 +0000 (+0100) Subject: another try at cleanly unlocking the mutexes before destroying them in SMPI::RMA X-Git-Tag: v3.35~56 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5edec65e26d76490b9753d8db950a8a2ddf3cb2c another try at cleanly unlocking the mutexes before destroying them in SMPI::RMA --- diff --git a/src/smpi/mpi/smpi_win.cpp b/src/smpi/mpi/smpi_win.cpp index b6d1f34e1e..af63fe62d0 100644 --- a/src/smpi/mpi/smpi_win.cpp +++ b/src/smpi/mpi/smpi_win.cpp @@ -97,8 +97,9 @@ int Win::del(Win* win){ } if (win->allocated_) xbt_free(win->base_); - if (win->mut_->get_owner() != nullptr) - win->mut_->unlock(); + for (auto m : {win->mut_, win->lock_mut_, win->atomic_mut_}) + if (m->get_owner() != nullptr) + m->unlock(); F2C::free_f(win->f2c_id()); win->cleanup_attr();