namespace simgrid {
namespace simix {
-Mutex::Mutex() : mutex_(this)
+MutexImpl::MutexImpl() : mutex_(this)
{
XBT_IN("(%p)", this);
// Useful to initialize sleeping swag:
XBT_OUT();
}
-Mutex::~Mutex()
+MutexImpl::~MutexImpl()
{
XBT_IN("(%p)", this);
xbt_swag_free(this->sleeping);
XBT_OUT();
}
-void Mutex::lock(smx_actor_t issuer)
+void MutexImpl::lock(smx_actor_t issuer)
{
XBT_IN("(%p; %p)", this, issuer);
/* FIXME: check where to validate the arguments */
* \param issuer the process that tries to acquire the mutex
* \return whether we managed to lock the mutex
*/
-bool Mutex::try_lock(smx_actor_t issuer)
+bool MutexImpl::try_lock(smx_actor_t issuer)
{
XBT_IN("(%p, %p)", this, issuer);
if (this->locked) {
* If the unlocker is not the owner of the mutex nothing happens.
* If there are no process waiting, it sets the mutex as free.
*/
-void Mutex::unlock(smx_actor_t issuer)
+void MutexImpl::unlock(smx_actor_t issuer)
{
XBT_IN("(%p, %p)", this, issuer);
if (not this->locked)
smx_mutex_t simcall_HANDLER_mutex_init(smx_simcall_t simcall)
{
- return new simgrid::simix::Mutex();
+ return new simgrid::simix::MutexImpl();
}
// Simcall handlers: