req = &actor->simcall_;
break;
- case Simcall::COMM_TESTANY: {
+ case Simcall::COMM_TESTANY:
state->transition_.times_considered_ = -1;
while (procstate->times_considered < simcall_comm_testany__get__count(&actor->simcall_)) {
if (simgrid::mc::request_is_enabled_by_idx(&actor->simcall_, procstate->times_considered)) {
if (state->transition_.times_considered_ != -1)
req = &actor->simcall_;
break;
- }
case Simcall::COMM_WAIT: {
simgrid::mc::RemotePtr<simgrid::kernel::activity::CommImpl> remote_act =
unsigned long Api::get_maxpid() const
{
+ static const char* name = nullptr;
+ if (not name) {
+ name = "simgrid::kernel::actor::maxpid";
+ if (mc_model_checker->get_remote_simulation().find_variable(name) == nullptr)
+ name = "maxpid"; // We seem to miss the namespaces when compiling with GCC
+ }
unsigned long maxpid;
- const char* name = "simgrid::kernel::actor::maxpid";
- if (mc_model_checker->get_remote_simulation().find_variable(name) == nullptr)
- name = "maxpid"; // We seem to miss the namespaces when compiling with GCC
mc_model_checker->get_remote_simulation().read_variable(name, &maxpid, sizeof(maxpid));
return maxpid;
}
}
break;
- case Simcall::MUTEX_TRYLOCK:
case Simcall::MUTEX_LOCK: {
- if (req->call_ == Simcall::MUTEX_LOCK)
- type = "Mutex LOCK";
- else
- type = "Mutex TRYLOCK";
-
+ type = "Mutex LOCK";
simgrid::mc::Remote<simgrid::kernel::activity::MutexImpl> mutex;
mc_model_checker->get_remote_simulation().read_bytes(mutex.get_buffer(), sizeof(mutex),
- remote(req->call_ == Simcall::MUTEX_LOCK
- ? simcall_mutex_lock__get__mutex(req)
- : simcall_mutex_trylock__get__mutex(req)));
+ remote(simcall_mutex_lock__get__mutex(req)));
args = "locked = " + std::to_string(mutex.get_buffer()->is_locked()) + ", owner = ";
if (mutex.get_buffer()->get_owner() != nullptr)
args += std::to_string(mc_model_checker->get_remote_simulation()
}
break;
- case Simcall::MUTEX_TRYLOCK:
- label = "[" + get_actor_dot_label(issuer) + "] Mutex TRYLOCK";
- break;
-
case Simcall::MUTEX_LOCK:
label = "[" + get_actor_dot_label(issuer) + "] Mutex LOCK";
break;