#include "simgrid/mutex.h"
#include "simgrid/s4u/Mutex.hpp"
#include "src/kernel/activity/MutexImpl.hpp"
+#include "src/mc/checker/SimcallObserver.hpp"
namespace simgrid {
namespace s4u {
*/
void Mutex::unlock()
{
- simcall_mutex_unlock(pimpl_);
+ kernel::actor::ActorImpl* issuer = kernel::actor::ActorImpl::self();
+ mc::MutexUnlockSimcall observer{issuer};
+ kernel::actor::simcall([this, issuer] { this->pimpl_->unlock(issuer); }, &observer);
}
/** @brief Acquire the mutex if it's free, and return false (without blocking) if not */
*/
MutexPtr Mutex::create()
{
- kernel::activity::MutexImpl* mutex = kernel::actor::simcall([] { return new kernel::activity::MutexImpl(); });
+ auto* mutex = new kernel::activity::MutexImpl();
return MutexPtr(&mutex->mutex(), false);
}