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
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git]
/
src
/
mc
/
mc_request.cpp
diff --git
a/src/mc/mc_request.cpp
b/src/mc/mc_request.cpp
index
4dfc427
..
9791660
100644
(file)
--- a/
src/mc/mc_request.cpp
+++ b/
src/mc/mc_request.cpp
@@
-401,12
+401,20
@@
char *MC_request_to_string(smx_simcall_t req, int value, e_mc_request_type_t req
}
break;
}
break;
+ case SIMCALL_MUTEX_TRYLOCK:
case SIMCALL_MUTEX_LOCK: {
case SIMCALL_MUTEX_LOCK: {
- type = "Mutex LOCK";
+ if (req->call == SIMCALL_MUTEX_LOCK)
+ type = "Mutex LOCK";
+ else
+ type = "Mutex TRYLOCK";
s_smx_mutex_t mutex;
mc_model_checker->process().read_bytes(&mutex, sizeof(mutex),
s_smx_mutex_t mutex;
mc_model_checker->process().read_bytes(&mutex, sizeof(mutex),
- remote(simcall_mutex_lock__get__mutex(req)));
+ remote(
+ req->call == SIMCALL_MUTEX_LOCK
+ ? simcall_mutex_lock__get__mutex(req)
+ : simcall_mutex_trylock__get__mutex(req)
+ ));
s_xbt_swag_t mutex_sleeping;
mc_model_checker->process().read_bytes(&mutex_sleeping, sizeof(mutex_sleeping),
remote(mutex.sleeping));
s_xbt_swag_t mutex_sleeping;
mc_model_checker->process().read_bytes(&mutex_sleeping, sizeof(mutex_sleeping),
remote(mutex.sleeping));
@@
-649,8
+657,12
@@
char *MC_request_get_dot_output(smx_simcall_t req, int value)
}
break;
}
break;
+ case SIMCALL_MUTEX_TRYLOCK:
+ label = bprintf("[(%lu)] Mutex TRYLOCK", issuer->pid);
+ break;
+
case SIMCALL_MUTEX_LOCK:
case SIMCALL_MUTEX_LOCK:
- label = bprintf("[(%lu)] Mutex LOCK",
req->
issuer->pid);
+ label = bprintf("[(%lu)] Mutex LOCK", issuer->pid);
break;
case SIMCALL_MC_RANDOM:
break;
case SIMCALL_MC_RANDOM: