The behavior of a MessageQueue is similar to that of a Mailbox, but intended for
control messages that do not incur any simulated cost. Information is automagically
transported over thin air between producer and consumer. See examples/cpp/mess-wait
+ - New function: Mutex::get_owner()
New S4U plugins:
- Add a JBOD (just a bunch of disks) concept. It's a sort of host with many disks.
#ifndef SIMGRID_S4U_MUTEX_HPP
#define SIMGRID_S4U_MUTEX_HPP
+#include "simgrid/s4u/Actor.hpp"
#include <simgrid/forward.h>
#include <xbt/asserts.h>
void lock();
void unlock();
bool try_lock();
+
+ Actor* get_owner();
};
} // namespace simgrid::s4u
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)
{