A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
model-checker : really (?) fix SIMCALL_MUTEX_LOCK and UNLOCK with MC
[simgrid.git]
/
src
/
mc
/
mc_request.c
diff --git
a/src/mc/mc_request.c
b/src/mc/mc_request.c
index
af7f1ef
..
ce77485
100644
(file)
--- a/
src/mc/mc_request.c
+++ b/
src/mc/mc_request.c
@@
-231,6
+231,7
@@
char *MC_request_to_string(smx_simcall_t req, int value)
{
char *type = NULL, *args = NULL, *str = NULL, *p = NULL, *bs = NULL;
smx_synchro_t act = NULL;
+ smx_mutex_t mutex = NULL;
size_t size = 0;
switch (req->call) {
@@
-328,6
+329,18
@@
char *MC_request_to_string(smx_simcall_t req, int value)
}
break;
+ case SIMCALL_MUTEX_LOCK:
+ mutex = simcall_mutex_lock__get__mutex(req);
+ type = xbt_strdup("Mutex LOCK");
+ args = bprintf("locked = %d, owner = %d, sleeping = %d", mutex->locked, mutex->owner != NULL ? (int)mutex->owner->pid : -1, xbt_swag_size(mutex->sleeping));
+ break;
+
+ case SIMCALL_MUTEX_UNLOCK:
+ type = xbt_strdup("Mutex UNLOCK");
+ mutex = simcall_mutex_unlock__get__mutex(req);
+ args = bprintf("locked = %d, owner = %lu, sleeping = %d", mutex->locked, mutex->owner->pid, xbt_swag_size(mutex->sleeping));
+ break;
+
case SIMCALL_MC_SNAPSHOT:
type = xbt_strdup("MC_SNAPSHOT");
args = NULL;