X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5843ccab4e336d47ca34f54e68760ac78d242f36..4fb5244980199691e9976323c2c3a09ebb168242:/src/s4u/s4u_Mutex.cpp diff --git a/src/s4u/s4u_Mutex.cpp b/src/s4u/s4u_Mutex.cpp index 12fa915d5b..e2cc10d007 100644 --- a/src/s4u/s4u_Mutex.cpp +++ b/src/s4u/s4u_Mutex.cpp @@ -61,6 +61,14 @@ MutexPtr Mutex::create(bool recursive) return MutexPtr(&mutex->mutex(), 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 */ void intrusive_ptr_add_ref(const Mutex* mutex) {