X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5de8fe9ad7bfa1bee9e28dd030f6c57ea529ad20..7953076403881f1cb220355b9c5962ce0bcb371b:/src/simix/smx_synchro.cpp diff --git a/src/simix/smx_synchro.cpp b/src/simix/smx_synchro.cpp index 66375d4ac6..66f332c15e 100644 --- a/src/simix/smx_synchro.cpp +++ b/src/simix/smx_synchro.cpp @@ -1,5 +1,4 @@ - -/* Copyright (c) 2007-2015. The SimGrid Team. +/* Copyright (c) 2007-2017. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -169,7 +168,7 @@ void MutexImpl::unlock(smx_actor_t issuer) /* If the mutex is not owned by the issuer, that's not good */ if (issuer != this->owner) - 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:%lu), not by you.", this->owner->cname(), this->owner->pid); if (xbt_swag_size(this->sleeping) > 0) { @@ -216,6 +215,11 @@ int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex) return mutex->try_lock(simcall->issuer); } +void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex) +{ + mutex->unlock(simcall->issuer); +} + /********************************* Condition **********************************/ /**