X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b3b356352e87ae00a20f737c48e19b0c8413455a..f2465cfbb5b6da9302d8cd614613afd54eb89e32:/src/mc/mc_request.cpp diff --git a/src/mc/mc_request.cpp b/src/mc/mc_request.cpp index 4dfc427c71..979166090a 100644 --- 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; + case SIMCALL_MUTEX_TRYLOCK: 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), - 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)); @@ -649,8 +657,12 @@ char *MC_request_get_dot_output(smx_simcall_t req, int value) } break; + case SIMCALL_MUTEX_TRYLOCK: + label = bprintf("[(%lu)] Mutex TRYLOCK", issuer->pid); + break; + case SIMCALL_MUTEX_LOCK: - label = bprintf("[(%lu)] Mutex LOCK", req->issuer->pid); + label = bprintf("[(%lu)] Mutex LOCK", issuer->pid); break; case SIMCALL_MC_RANDOM: