X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2de2f4073329fac1cc52b4e5f60cf2b784930825..d78a7f87e28a15c0f1e71e4510a055554e0e5e9b:/src/s4u/s4u_Mutex.cpp diff --git a/src/s4u/s4u_Mutex.cpp b/src/s4u/s4u_Mutex.cpp index 38b57a6e95..8975cb7bae 100644 --- a/src/s4u/s4u_Mutex.cpp +++ b/src/s4u/s4u_Mutex.cpp @@ -21,7 +21,9 @@ Mutex::~Mutex() /** @brief Blocks the calling actor until the mutex can be obtained */ void Mutex::lock() { - simcall_mutex_lock(pimpl_); + kernel::actor::ActorImpl* issuer = kernel::actor::ActorImpl::self(); + mc::MutexLockSimcall observer{issuer, pimpl_}; + kernel::actor::simcall_blocking([&observer] { observer.get_mutex()->lock(observer.get_issuer()); }, &observer); } /** @brief Release the ownership of the mutex, unleashing a blocked actor (if any)