X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eb680c004b00a59218e7cdaa77fc2c96066c3548..8052f28d5b5a9d88b6724dff2e5e81dee10065d7:/src/s4u/s4u_Mutex.cpp diff --git a/src/s4u/s4u_Mutex.cpp b/src/s4u/s4u_Mutex.cpp index 12fa915d5b..72c2481736 100644 --- a/src/s4u/s4u_Mutex.cpp +++ b/src/s4u/s4u_Mutex.cpp @@ -58,7 +58,15 @@ bool Mutex::try_lock() MutexPtr Mutex::create(bool recursive) { auto* mutex = new kernel::activity::MutexImpl(recursive); - return MutexPtr(&mutex->mutex(), false); + return MutexPtr(&mutex->get_iface(), false); +} + +Actor* Mutex::get_owner() +{ + auto* owner = pimpl_->get_owner(); + if (owner == nullptr) + return nullptr; + return owner->get_ciface(); } /* refcounting of the intrusive_ptr is delegated to the implementation object */