/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/activity/MutexImpl.hpp"
#include "src/kernel/activity/SynchroRaw.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/activity/MutexImpl.hpp"
#include "src/kernel/activity/SynchroRaw.hpp"
{
XBT_IN("(%p; %p)", this, issuer);
/* FIXME: check where to validate the arguments */
{
XBT_IN("(%p; %p)", this, issuer);
/* FIXME: check where to validate the arguments */
/* FIXME: check if the host is active ? */
/* Somebody using the mutex, use a synchronization to get host failures */
/* FIXME: check if the host is active ? */
/* Somebody using the mutex, use a synchronization to get host failures */
- * \param issuer the process that tries to acquire the mutex
- * \return whether we managed to lock the mutex
+ * @param issuer the process that tries to acquire the mutex
+ * @return whether we managed to lock the mutex
{
XBT_IN("(%p, %p)", this, issuer);
{
XBT_IN("(%p, %p)", this, issuer);
* If the unlocker is not the owner of the mutex nothing happens.
* If there are no process waiting, it sets the mutex as free.
*/
* If the unlocker is not the owner of the mutex nothing happens.
* If there are no process waiting, it sets the mutex as free.
*/
{
XBT_IN("(%p, %p)", this, issuer);
{
XBT_IN("(%p, %p)", this, issuer);
THROWF(mismatch_error, 0, "Cannot release that mutex: it was not locked.");
/* If the mutex is not owned by the issuer, that's not good */
THROWF(mismatch_error, 0, "Cannot release that mutex: it was not locked.");
/* If the mutex is not owned by the issuer, that's not good */
THROWF(mismatch_error, 0, "Cannot release that mutex: it was locked by %s (pid:%ld), not by you.",
THROWF(mismatch_error, 0, "Cannot release that mutex: it was locked by %s (pid:%ld), not by you.",