X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2568ec7bdc945fa4beebf200756910f8b5b7903a..e4d3739e981eb46fbfca0ff837c681e26e8a44c6:/src/mc/mc_request.cpp?ds=sidebyside diff --git a/src/mc/mc_request.cpp b/src/mc/mc_request.cpp index 4503597f38..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,6 +657,10 @@ 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", issuer->pid); break;