#include <cassert>
#include "src/include/mc/mc.h"
+#include "src/kernel/activity/MutexImpl.hpp"
#include "src/mc/ModelChecker.hpp"
#include "src/mc/mc_request.hpp"
#include "src/mc/mc_smx.hpp"
read_element(mc_model_checker->process(),
&remote_sync, remote(simcall_comm_waitany__get__comms(req)), value,
sizeof(remote_sync));
- char* p = pointer_to_string(&*remote_sync);
+ char* p = pointer_to_string(remote_sync.get());
args = bprintf("comm=%s (%d of %lu)",
p, value + 1, xbt_dynar_length(&comms));
xbt_free(p);
else
type = "Mutex TRYLOCK";
- simgrid::mc::Remote<simgrid::simix::MutexImpl> mutex;
+ simgrid::mc::Remote<simgrid::kernel::activity::MutexImpl> mutex;
mc_model_checker->process().read_bytes(mutex.getBuffer(), sizeof(mutex),
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.getBuffer()->sleeping));
-
args =
- bprintf("locked = %d, owner = %d, sleeping = %d", mutex.getBuffer()->locked,
+ bprintf("locked = %d, owner = %d, sleeping = n/a", mutex.getBuffer()->locked,
mutex.getBuffer()->owner != nullptr
? (int)mc_model_checker->process().resolveActor(simgrid::mc::remote(mutex.getBuffer()->owner))->pid
- : -1,
- mutex_sleeping.count);
+ : -1);
break;
}
remote_act = simcall_comm_wait__getraw__comm(req);
break;
- case SIMCALL_COMM_WAITANY: {
+ case SIMCALL_COMM_WAITANY:
read_element(mc_model_checker->process(), &remote_act, remote(simcall_comm_waitany__getraw__comms(req)), idx,
sizeof(remote_act));
- }
break;
case SIMCALL_COMM_TESTANY:
label = simgrid::xbt::string_printf("[(%lu)] iRecv", issuer->pid);
break;
- case SIMCALL_COMM_WAIT: {
+ case SIMCALL_COMM_WAIT:
if (value == -1) {
if (issuer->host)
label = simgrid::xbt::string_printf("[(%lu)%s] WaitTimeout", issuer->pid, MC_smx_actor_get_host_name(issuer));
dst_proc ? dst_proc->pid : 0);
}
break;
- }
case SIMCALL_COMM_TEST: {
simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_test__getraw__comm(req);