-/* Copyright (c) 2008-2014. The SimGrid Team.
+/* Copyright (c) 2008-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
}
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));
}
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: