/** @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<void>([&observer] { observer.get_mutex()->lock(observer.get_issuer()); }, &observer);
}
/** @brief Release the ownership of the mutex, unleashing a blocked actor (if any)