void ActivityImpl::register_simcall(smx_simcall_t simcall)
{
simcalls_.push_back(simcall);
- simcall->issuer->waiting_synchro = this;
+ simcall->issuer_->waiting_synchro = this;
}
void ActivityImpl::clean_action()
if (timeout < 0.0)
THROW_IMPOSSIBLE;
- if (comm->src_actor_ == simcall->issuer)
+ if (comm->src_actor_ == simcall->issuer_)
comm->state_ = SIMIX_SRC_TIMEOUT;
else
comm->state_ = SIMIX_DST_TIMEOUT;
if (comm->state_ != SIMIX_WAITING && comm->state_ != SIMIX_RUNNING) {
comm->finish();
} else { /* we need a sleep action (even when there is no timeout) to be notified of host failures */
- simgrid::kernel::resource::Action* sleep = simcall->issuer->get_host()->pimpl_cpu->sleep(timeout);
+ simgrid::kernel::resource::Action* sleep = simcall->issuer_->get_host()->pimpl_cpu->sleep(timeout);
sleep->set_activity(comm);
- if (simcall->issuer == comm->src_actor_)
+ if (simcall->issuer_ == comm->src_actor_)
comm->src_timeout_ = sleep;
else
comm->dst_timeout_ = sleep;
comm->simcalls_.push_back(simcall);
comm->finish();
} else {
- simcall->issuer->simcall_answer();
+ simcall->issuer_->simcall_answer();
}
}
if (MC_is_active() || MC_record_replay_is_active()) {
int idx = SIMCALL_GET_MC_VALUE(*simcall);
if (idx == -1) {
- simcall->issuer->simcall_answer();
+ simcall->issuer_->simcall_answer();
} else {
simgrid::kernel::activity::CommImpl* comm = comms[idx];
simcall_comm_testany__set__result(simcall, idx);
return;
}
}
- simcall->issuer->simcall_answer();
+ simcall->issuer_->simcall_answer();
}
static void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall)
}
if (timeout < 0.0) {
- simcall->timeout_cb = NULL;
+ simcall->timeout_cb_ = NULL;
} else {
- simcall->timeout_cb = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall]() {
+ simcall->timeout_cb_ = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall]() {
SIMIX_waitany_remove_simcall_from_actions(simcall);
simcall_comm_waitany__set__result(simcall, -1);
- simcall->issuer->simcall_answer();
+ simcall->issuer_->simcall_answer();
});
}
* list. Afterwards, get the position of the actual synchro in the waitany list and return it as the result of the
* simcall */
- if (simcall->call == SIMCALL_NONE) // FIXME: maybe a better way to handle this case
+ if (simcall->call_ == SIMCALL_NONE) // FIXME: maybe a better way to handle this case
continue; // if process handling comm is killed
- if (simcall->call == SIMCALL_COMM_WAITANY) {
+ if (simcall->call_ == SIMCALL_COMM_WAITANY) {
SIMIX_waitany_remove_simcall_from_actions(simcall);
- if (simcall->timeout_cb) {
- simcall->timeout_cb->remove();
- simcall->timeout_cb = nullptr;
+ if (simcall->timeout_cb_) {
+ simcall->timeout_cb_->remove();
+ simcall->timeout_cb_ = nullptr;
}
if (not MC_is_active() && not MC_record_replay_is_active()) {
CommImpl** comms = simcall_comm_waitany__get__comms(simcall);
/* Check out for errors */
- if (not simcall->issuer->get_host()->is_on()) {
- simcall->issuer->context_->iwannadie = true;
+ if (not simcall->issuer_->get_host()->is_on()) {
+ simcall->issuer_->context_->iwannadie = true;
} else {
switch (state_) {
break;
case SIMIX_SRC_TIMEOUT:
- simcall->issuer->exception_ = std::make_exception_ptr(
+ simcall->issuer_->exception_ = std::make_exception_ptr(
simgrid::TimeoutException(XBT_THROW_POINT, "Communication timeouted because of the sender"));
break;
case SIMIX_DST_TIMEOUT:
- simcall->issuer->exception_ = std::make_exception_ptr(
+ simcall->issuer_->exception_ = std::make_exception_ptr(
simgrid::TimeoutException(XBT_THROW_POINT, "Communication timeouted because of the receiver"));
break;
case SIMIX_SRC_HOST_FAILURE:
- if (simcall->issuer == src_actor_)
- simcall->issuer->context_->iwannadie = true;
+ if (simcall->issuer_ == src_actor_)
+ simcall->issuer_->context_->iwannadie = true;
else
- simcall->issuer->exception_ =
+ simcall->issuer_->exception_ =
std::make_exception_ptr(simgrid::NetworkFailureException(XBT_THROW_POINT, "Remote peer failed"));
break;
case SIMIX_DST_HOST_FAILURE:
- if (simcall->issuer == dst_actor_)
- simcall->issuer->context_->iwannadie = true;
+ if (simcall->issuer_ == dst_actor_)
+ simcall->issuer_->context_->iwannadie = true;
else
- simcall->issuer->exception_ =
+ simcall->issuer_->exception_ =
std::make_exception_ptr(simgrid::NetworkFailureException(XBT_THROW_POINT, "Remote peer failed"));
break;
XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) "
"detached:%d",
this, src_actor_ ? src_actor_->get_host()->get_cname() : nullptr,
- dst_actor_ ? dst_actor_->get_host()->get_cname() : nullptr, simcall->issuer->get_cname(),
- simcall->issuer, detached_);
- if (src_actor_ == simcall->issuer) {
+ dst_actor_ ? dst_actor_->get_host()->get_cname() : nullptr, simcall->issuer_->get_cname(),
+ simcall->issuer_, detached_);
+ if (src_actor_ == simcall->issuer_) {
XBT_DEBUG("I'm source");
- } else if (dst_actor_ == simcall->issuer) {
+ } else if (dst_actor_ == simcall->issuer_) {
XBT_DEBUG("I'm dest");
} else {
XBT_DEBUG("I'm neither source nor dest");
}
- simcall->issuer->throw_exception(
+ simcall->issuer_->throw_exception(
std::make_exception_ptr(simgrid::NetworkFailureException(XBT_THROW_POINT, "Link failure")));
break;
case SIMIX_CANCELED:
- if (simcall->issuer == dst_actor_)
- simcall->issuer->exception_ = std::make_exception_ptr(
+ if (simcall->issuer_ == dst_actor_)
+ simcall->issuer_->exception_ = std::make_exception_ptr(
simgrid::CancelException(XBT_THROW_POINT, "Communication canceled by the sender"));
else
- simcall->issuer->exception_ = std::make_exception_ptr(
+ simcall->issuer_->exception_ = std::make_exception_ptr(
simgrid::CancelException(XBT_THROW_POINT, "Communication canceled by the receiver"));
break;
}
}
/* if there is an exception during a waitany or a testany, indicate the position of the failed communication */
- if (simcall->issuer->exception_ &&
- (simcall->call == SIMCALL_COMM_WAITANY || simcall->call == SIMCALL_COMM_TESTANY)) {
+ if (simcall->issuer_->exception_ &&
+ (simcall->call_ == SIMCALL_COMM_WAITANY || simcall->call_ == SIMCALL_COMM_TESTANY)) {
// First retrieve the rank of our failing synchro
CommImpl** comms;
size_t count;
- if (simcall->call == SIMCALL_COMM_WAITANY) {
+ if (simcall->call_ == SIMCALL_COMM_WAITANY) {
comms = simcall_comm_waitany__get__comms(simcall);
count = simcall_comm_waitany__get__count(simcall);
} else {
// In order to modify the exception we have to rethrow it:
try {
- std::rethrow_exception(simcall->issuer->exception_);
+ std::rethrow_exception(simcall->issuer_->exception_);
} catch (simgrid::Exception& e) {
e.value = rank;
}
}
- simcall->issuer->waiting_synchro = nullptr;
- simcall->issuer->comms.remove(this);
+ simcall->issuer_->waiting_synchro = nullptr;
+ simcall->issuer_->comms.remove(this);
if (detached_) {
- if (simcall->issuer == src_actor_) {
+ if (simcall->issuer_ == src_actor_) {
if (dst_actor_)
dst_actor_->comms.remove(this);
- } else if (simcall->issuer == dst_actor_) {
+ } else if (simcall->issuer_ == dst_actor_) {
if (src_actor_)
src_actor_->comms.remove(this);
} else {
}
}
- if (simcall->issuer->get_host()->is_on())
- simcall->issuer->simcall_answer();
+ if (simcall->issuer_->get_host()->is_on())
+ simcall->issuer_->simcall_answer();
else
- simcall->issuer->context_->iwannadie = true;
+ simcall->issuer_->context_->iwannadie = true;
}
}
void simcall_HANDLER_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex)
{
XBT_IN("(%p)", simcall);
- smx_actor_t issuer = simcall->issuer;
+ smx_actor_t issuer = simcall->issuer_;
cond->wait(mutex, -1, issuer, simcall);
XBT_OUT();
void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex, double timeout)
{
XBT_IN("(%p)", simcall);
- smx_actor_t issuer = simcall->issuer;
+ smx_actor_t issuer = simcall->issuer_;
simcall_cond_wait_timeout__set__result(simcall, 0); // default result, will be set to 1 on timeout
cond->wait(mutex, timeout, issuer, simcall);
XBT_OUT();
/* Now transform the cond wait simcall into a mutex lock one */
smx_simcall_t simcall = &proc.simcall;
MutexImpl* simcall_mutex;
- if (simcall->call == SIMCALL_COND_WAIT)
+ if (simcall->call_ == SIMCALL_COND_WAIT)
simcall_mutex = simcall_cond_wait__get__mutex(simcall);
else
simcall_mutex = simcall_cond_wait_timeout__get__mutex(simcall);
- simcall->call = SIMCALL_MUTEX_LOCK;
+ simcall->call_ = SIMCALL_MUTEX_LOCK;
- simcall_mutex->lock(simcall->issuer);
+ simcall_mutex->lock(simcall->issuer_);
}
XBT_OUT();
}
(*synchro).set_host(issuer->get_host()).set_timeout(timeout).start();
synchro->simcalls_.push_front(simcall);
issuer->waiting_synchro = std::move(synchro);
- sleeping_.push_back(*simcall->issuer);
+ sleeping_.push_back(*simcall->issuer_);
}
// boost::intrusive_ptr<ConditionVariableImpl> support:
synchro->simcalls_.push_back(simcall);
synchro->finish();
} else {
- simcall->issuer->simcall_answer();
+ simcall->issuer_->simcall_answer();
}
simcall_execution_test__set__result(simcall, res);
}
size_t count, double timeout)
{
if (timeout < 0.0) {
- simcall->timeout_cb = nullptr;
+ simcall->timeout_cb_ = nullptr;
} else {
- simcall->timeout_cb = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall, execs, count]() {
+ simcall->timeout_cb_ = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall, execs, count]() {
for (size_t i = 0; i < count; i++) {
// Remove the first occurence of simcall:
auto* exec = execs[i];
exec->simcalls_.erase(j);
}
simcall_execution_waitany_for__set__result(simcall, -1);
- simcall->issuer->simcall_answer();
+ simcall->issuer_->simcall_answer();
});
}
* list. Afterwards, get the position of the actual synchro in the waitany list and return it as the result of the
* simcall */
- if (simcall->call == SIMCALL_NONE) // FIXME: maybe a better way to handle this case
+ if (simcall->call_ == SIMCALL_NONE) // FIXME: maybe a better way to handle this case
continue; // if process handling comm is killed
- if (simcall->call == SIMCALL_EXECUTION_WAITANY_FOR) {
+ if (simcall->call_ == SIMCALL_EXECUTION_WAITANY_FOR) {
simgrid::kernel::activity::ExecImpl** execs = simcall_execution_waitany_for__get__execs(simcall);
size_t count = simcall_execution_waitany_for__get__count(simcall);
if (j != exec->simcalls_.end())
exec->simcalls_.erase(j);
- if (simcall->timeout_cb) {
- simcall->timeout_cb->remove();
- simcall->timeout_cb = nullptr;
+ if (simcall->timeout_cb_) {
+ simcall->timeout_cb_->remove();
+ simcall->timeout_cb_ = nullptr;
}
}
break;
case SIMIX_FAILED:
- XBT_DEBUG("ExecImpl::finish(): host '%s' failed", simcall->issuer->get_host()->get_cname());
- simcall->issuer->context_->iwannadie = true;
- if (simcall->issuer->get_host()->is_on())
- simcall->issuer->exception_ =
+ XBT_DEBUG("ExecImpl::finish(): host '%s' failed", simcall->issuer_->get_host()->get_cname());
+ simcall->issuer_->context_->iwannadie = true;
+ if (simcall->issuer_->get_host()->is_on())
+ simcall->issuer_->exception_ =
std::make_exception_ptr(simgrid::HostFailureException(XBT_THROW_POINT, "Host failed"));
/* else, the actor will be killed with no possibility to survive */
break;
case SIMIX_CANCELED:
XBT_DEBUG("ExecImpl::finish(): execution canceled");
- simcall->issuer->exception_ =
+ simcall->issuer_->exception_ =
std::make_exception_ptr(simgrid::CancelException(XBT_THROW_POINT, "Execution Canceled"));
break;
case SIMIX_TIMEOUT:
XBT_DEBUG("ExecImpl::finish(): execution timeouted");
- simcall->issuer->exception_ = std::make_exception_ptr(simgrid::TimeoutException(XBT_THROW_POINT, "Timeouted"));
+ simcall->issuer_->exception_ = std::make_exception_ptr(simgrid::TimeoutException(XBT_THROW_POINT, "Timeouted"));
break;
default:
xbt_die("Internal error in ExecImpl::finish(): unexpected synchro state %d", static_cast<int>(state_));
}
- simcall->issuer->waiting_synchro = nullptr;
+ simcall->issuer_->waiting_synchro = nullptr;
/* Fail the process if the host is down */
- if (simcall->issuer->get_host()->is_on())
- simcall->issuer->simcall_answer();
+ if (simcall->issuer_->get_host()->is_on())
+ simcall->issuer_->simcall_answer();
else
- simcall->issuer->context_->iwannadie = true;
+ simcall->issuer_->context_->iwannadie = true;
}
}
/* do nothing, synchro done */
break;
case SIMIX_FAILED:
- simcall->issuer->context_->iwannadie = true;
- simcall->issuer->exception_ =
+ simcall->issuer_->context_->iwannadie = true;
+ simcall->issuer_->exception_ =
std::make_exception_ptr(StorageFailureException(XBT_THROW_POINT, "Storage failed"));
break;
case SIMIX_CANCELED:
- simcall->issuer->exception_ = std::make_exception_ptr(CancelException(XBT_THROW_POINT, "I/O Canceled"));
+ simcall->issuer_->exception_ = std::make_exception_ptr(CancelException(XBT_THROW_POINT, "I/O Canceled"));
break;
default:
xbt_die("Internal error in IoImpl::finish(): unexpected synchro state %d", static_cast<int>(state_));
}
- simcall->issuer->waiting_synchro = nullptr;
- simcall->issuer->simcall_answer();
+ simcall->issuer_->waiting_synchro = nullptr;
+ simcall->issuer_->simcall_answer();
}
}
void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex)
{
- mutex->lock(simcall->issuer);
+ mutex->lock(simcall->issuer_);
}
int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex)
{
- return mutex->try_lock(simcall->issuer);
+ return mutex->try_lock(simcall->issuer_);
}
void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex)
{
- mutex->unlock(simcall->issuer);
+ mutex->unlock(simcall->issuer_);
}
*/
void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem)
{
- sem->acquire(simcall->issuer, -1);
+ sem->acquire(simcall->issuer_, -1);
}
/**
void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout)
{
simcall_sem_acquire_timeout__set__result(simcall, 0); // default result, will be set to 1 on timeout
- sem->acquire(simcall->issuer, timeout);
+ sem->acquire(simcall->issuer_, timeout);
}
smx_simcall_t simcall = simcalls_.front();
simcalls_.pop_front();
- simcall->issuer->waiting_synchro = nullptr;
- if (simcall->issuer->is_suspended()) {
+ simcall->issuer_->waiting_synchro = nullptr;
+ if (simcall->issuer_->is_suspended()) {
XBT_DEBUG("Wait! This process is suspended and can't wake up now.");
- simcall->issuer->suspended_ = false;
- simcall->issuer->suspend(simcall->issuer);
+ simcall->issuer_->suspended_ = false;
+ simcall->issuer_->suspend(simcall->issuer_);
} else {
- simcall->issuer->simcall_answer();
+ simcall->issuer_->simcall_answer();
}
}
simcalls_.pop_front();
if (state_ == SIMIX_FAILED) {
- XBT_DEBUG("RawImpl::finish(): host '%s' failed", simcall->issuer->get_host()->get_cname());
- simcall->issuer->context_->iwannadie = true;
- simcall->issuer->exception_ = std::make_exception_ptr(HostFailureException(XBT_THROW_POINT, "Host failed"));
+ XBT_DEBUG("RawImpl::finish(): host '%s' failed", simcall->issuer_->get_host()->get_cname());
+ simcall->issuer_->context_->iwannadie = true;
+ simcall->issuer_->exception_ = std::make_exception_ptr(HostFailureException(XBT_THROW_POINT, "Host failed"));
} else if (state_ != SIMIX_SRC_TIMEOUT) {
xbt_die("Internal error in RawImpl::finish() unexpected synchro state %d", static_cast<int>(state_));
}
- switch (simcall->call) {
+ switch (simcall->call_) {
case SIMCALL_MUTEX_LOCK:
- simgrid::xbt::intrusive_erase(simcall_mutex_lock__get__mutex(simcall)->sleeping_, *simcall->issuer);
+ simgrid::xbt::intrusive_erase(simcall_mutex_lock__get__mutex(simcall)->sleeping_, *simcall->issuer_);
break;
case SIMCALL_COND_WAIT:
- simgrid::xbt::intrusive_erase(simcall_cond_wait__get__cond(simcall)->sleeping_, *simcall->issuer);
+ simgrid::xbt::intrusive_erase(simcall_cond_wait__get__cond(simcall)->sleeping_, *simcall->issuer_);
break;
case SIMCALL_COND_WAIT_TIMEOUT:
- simgrid::xbt::intrusive_erase(simcall_cond_wait_timeout__get__cond(simcall)->sleeping_, *simcall->issuer);
+ simgrid::xbt::intrusive_erase(simcall_cond_wait_timeout__get__cond(simcall)->sleeping_, *simcall->issuer_);
simcall_cond_wait_timeout__set__result(simcall, 1); // signal a timeout
break;
case SIMCALL_SEM_ACQUIRE:
- simgrid::xbt::intrusive_erase(simcall_sem_acquire__get__sem(simcall)->sleeping_, *simcall->issuer);
+ simgrid::xbt::intrusive_erase(simcall_sem_acquire__get__sem(simcall)->sleeping_, *simcall->issuer_);
break;
case SIMCALL_SEM_ACQUIRE_TIMEOUT:
- simgrid::xbt::intrusive_erase(simcall_sem_acquire_timeout__get__sem(simcall)->sleeping_, *simcall->issuer);
+ simgrid::xbt::intrusive_erase(simcall_sem_acquire_timeout__get__sem(simcall)->sleeping_, *simcall->issuer_);
simcall_sem_acquire_timeout__set__result(simcall, 1); // signal a timeout
break;
default:
THROW_IMPOSSIBLE;
}
- simcall->issuer->waiting_synchro = nullptr;
- simcall->issuer->simcall_answer();
+ simcall->issuer_->waiting_synchro = nullptr;
+ simcall->issuer_->simcall_answer();
}
} // namespace activity
ActorImpl::ActorImpl(const simgrid::xbt::string& name, s4u::Host* host) : host_(host), name_(name), piface_(this)
{
pid_ = maxpid++;
- simcall.issuer = this;
+ simcall.issuer_ = this;
}
ActorImpl::~ActorImpl()
void ActorImpl::simcall_answer()
{
if (this != simix_global->maestro_process){
- XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall.call), (int)simcall.call,
+ XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall.call_), (int)simcall.call_,
get_cname(), this);
- simcall.call = SIMCALL_NONE;
+ simcall.call_ = SIMCALL_NONE;
xbt_assert(not XBT_LOG_ISENABLED(simix_process, xbt_log_priority_debug) ||
std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), this) ==
end(simix_global->actors_to_run),
maestro->context_.reset(simix_global->context_factory->create_maestro(simix::ActorCode(code), maestro));
}
- maestro->simcall.issuer = maestro;
+ maestro->simcall.issuer_ = maestro;
simix_global->maestro_process = maestro;
}
s_mc_message_simcall_handle_t m;
memset(&m, 0, sizeof(m));
m.type = MC_MESSAGE_SIMCALL_HANDLE;
- m.pid = transition.pid;
- m.value = transition.argument;
+ m.pid = transition.pid_;
+ m.value = transition.argument_;
this->process_->get_channel().send(m);
this->process_->clear_cache();
if (this->process_->running())
*/
class Transition {
public:
- int pid = 0;
+ int pid_ = 0;
/* Which transition was executed for this simcall
*
*
* * random can produce different values.
*/
- int argument = 0;
+ int argument_ = 0;
};
}
std::unique_ptr<simgrid::mc::VisitedState> new_state =
std::unique_ptr<simgrid::mc::VisitedState>(new VisitedState(state_number));
graph_state->system_state = new_state->system_state;
- XBT_DEBUG("Snapshot %p of visited state %d (exploration stack state %d)",
- new_state->system_state.get(), new_state->num, graph_state->num);
+ XBT_DEBUG("Snapshot %p of visited state %d (exploration stack state %d)", new_state->system_state.get(),
+ new_state->num, graph_state->num_);
auto range =
boost::range::equal_range(states_, new_state.get(), simgrid::mc::DerefAndCompareByActorsCountAndUsedHeap());
{
RecordTrace res;
for (auto const& state : stack_)
- res.push_back(state->getTransition());
+ res.push_back(state->get_transition());
return res;
}
{
std::vector<std::string> trace;
for (auto const& state : stack_) {
- smx_simcall_t req = &state->executed_req;
+ smx_simcall_t req = &state->executed_req_;
if (req)
trace.push_back(
- simgrid::mc::request_to_string(req, state->transition.argument, simgrid::mc::RequestType::executed));
+ simgrid::mc::request_to_string(req, state->transition_.argument_, simgrid::mc::RequestType::executed));
}
return trace;
}
/* Get an enabled actor and insert it in the interleave set of the initial state */
for (auto& actor : mc_model_checker->process().actors())
if (simgrid::mc::actor_is_enabled(actor.copy.get_buffer()))
- initial_state->addInterleavingSet(actor.copy.get_buffer());
+ initial_state->add_interleaving_set(actor.copy.get_buffer());
stack_.push_back(std::move(initial_state));
}
if (state == stack_.back())
break;
- int req_num = state->transition.argument;
- smx_simcall_t saved_req = &state->executed_req;
+ int req_num = state->transition_.argument_;
+ smx_simcall_t saved_req = &state->executed_req_;
xbt_assert(saved_req);
/* because we got a copy of the executed request, we have to fetch the
/* TODO : handle test and testany simcalls */
e_mc_call_type_t call = MC_get_call_type(req);
- mc_model_checker->handle_simcall(state->transition);
+ mc_model_checker->handle_simcall(state->transition_);
MC_handle_comm_pattern(call, req, req_num, 1);
mc_model_checker->wait_for_requests();
simgrid::mc::State* cur_state = stack_.back().get();
XBT_DEBUG("**************************************************");
- XBT_DEBUG("Exploration depth = %zu (state = %d, interleaved processes = %zu)", stack_.size(), cur_state->num,
- cur_state->interleaveSize());
+ XBT_DEBUG("Exploration depth = %zu (state = %d, interleaved processes = %zu)", stack_.size(), cur_state->num_,
+ cur_state->interleave_size());
/* Update statistics */
mc_model_checker->visited_states++;
if (req != nullptr && visited_state == nullptr) {
- int req_num = cur_state->transition.argument;
+ int req_num = cur_state->transition_.argument_;
XBT_DEBUG("Execute: %s", simgrid::mc::request_to_string(req, req_num, simgrid::mc::RequestType::simix).c_str());
call = MC_get_call_type(req);
/* Answer the request */
- mc_model_checker->handle_simcall(cur_state->transition);
+ mc_model_checker->handle_simcall(cur_state->transition_);
/* After this call req is no longer useful */
MC_handle_comm_pattern(call, req, req_num, 0);
/* Get enabled actors and insert them in the interleave set of the next state */
for (auto& actor : mc_model_checker->process().actors())
if (simgrid::mc::actor_is_enabled(actor.copy.get_buffer()))
- next_state->addInterleavingSet(actor.copy.get_buffer());
+ next_state->add_interleaving_set(actor.copy.get_buffer());
if (dot_output != nullptr)
- fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", cur_state->num, next_state->num, req_str.c_str());
+ fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", cur_state->num_, next_state->num_, req_str.c_str());
} else if (dot_output != nullptr)
- fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", cur_state->num,
+ fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", cur_state->num_,
visited_state->original_num == -1 ? visited_state->num : visited_state->original_num, req_str.c_str());
stack_.push_back(std::move(next_state));
this->initial_communications_pattern_done = true;
/* Trash the current state, no longer needed */
- XBT_DEBUG("Delete state %d at depth %zu", cur_state->num, stack_.size());
+ XBT_DEBUG("Delete state %d at depth %zu", cur_state->num_, stack_.size());
stack_.pop_back();
visited_state = nullptr;
while (not stack_.empty()) {
std::unique_ptr<simgrid::mc::State> state(std::move(stack_.back()));
stack_.pop_back();
- if (state->interleaveSize() && stack_.size() < (std::size_t)_sg_mc_max_depth) {
+ if (state->interleave_size() && stack_.size() < (std::size_t)_sg_mc_max_depth) {
/* We found a back-tracking point, let's loop */
- XBT_DEBUG("Back-tracking to state %d at depth %zu", state->num, stack_.size() + 1);
+ XBT_DEBUG("Back-tracking to state %d at depth %zu", state->num_, stack_.size() + 1);
stack_.push_back(std::move(state));
this->restoreState();
- XBT_DEBUG("Back-tracking to state %d at depth %zu done", stack_.back()->num, stack_.size());
+ XBT_DEBUG("Back-tracking to state %d at depth %zu done", stack_.back()->num_, stack_.size());
break;
} else {
- XBT_DEBUG("Delete state %d at depth %zu", state->num, stack_.size() + 1);
+ XBT_DEBUG("Delete state %d at depth %zu", state->num_, stack_.size() + 1);
}
}
}
if (pair->exploration_started) {
- int req_num = state->transition.argument;
- smx_simcall_t saved_req = &state->executed_req;
+ int req_num = state->transition_.argument_;
+ smx_simcall_t saved_req = &state->executed_req_;
smx_simcall_t req = nullptr;
state.get());
}
- this->get_session().execute(state->transition);
+ this->get_session().execute(state->transition_);
}
/* Update statistics */
{
RecordTrace res;
for (std::shared_ptr<Pair> const& pair : exploration_stack_)
- res.push_back(pair->graph_state->getTransition());
+ res.push_back(pair->graph_state->get_transition());
return res;
}
{
std::vector<std::string> trace;
for (std::shared_ptr<Pair> const& pair : exploration_stack_) {
- int req_num = pair->graph_state->transition.argument;
- smx_simcall_t req = &pair->graph_state->executed_req;
- if (req && req->call != SIMCALL_NONE)
+ int req_num = pair->graph_state->transition_.argument_;
+ smx_simcall_t req = &pair->graph_state->executed_req_;
+ if (req && req->call_ != SIMCALL_NONE)
trace.push_back(simgrid::mc::request_to_string(
req, req_num, simgrid::mc::RequestType::executed));
}
/* Get enabled actors and insert them in the interleave set of the next graph_state */
for (auto& actor : mc_model_checker->process().actors())
if (simgrid::mc::actor_is_enabled(actor.copy.get_buffer()))
- next_pair->graph_state->addInterleavingSet(actor.copy.get_buffer());
- next_pair->requests = next_pair->graph_state->interleaveSize();
+ next_pair->graph_state->add_interleaving_set(actor.copy.get_buffer());
+ next_pair->requests = next_pair->graph_state->interleave_size();
/* FIXME : get search_cycle value for each accepting state */
if (next_pair->automaton_state->type == 1 || (current_pair && current_pair->search_cycle))
next_pair->search_cycle = true;
XBT_DEBUG(
"********************* ( Depth = %d, search_cycle = %d, interleave size = %zu, pair_num = %d, requests = %d)",
- current_pair->depth, current_pair->search_cycle, current_pair->graph_state->interleaveSize(), current_pair->num,
- current_pair->requests);
+ current_pair->depth, current_pair->search_cycle, current_pair->graph_state->interleave_size(),
+ current_pair->num, current_pair->requests);
if (current_pair->requests == 0) {
this->backtrack();
}
smx_simcall_t req = MC_state_get_request(current_pair->graph_state.get());
- int req_num = current_pair->graph_state->transition.argument;
+ int req_num = current_pair->graph_state->transition_.argument_;
if (dot_output != nullptr) {
if (this->previous_pair_ != 0 && this->previous_pair_ != current_pair->num) {
visited_pairs_count_++;
/* Answer the request */
- mc_model_checker->handle_simcall(current_pair->graph_state->transition);
+ mc_model_checker->handle_simcall(current_pair->graph_state->transition_);
/* Wait for requests (schedules processes) */
mc_model_checker->wait_for_requests();
{
for (auto state = stack_.rbegin(); state != stack_.rend(); ++state)
if (snapshot_equal((*state)->system_state.get(), current_state->system_state.get())) {
- XBT_INFO("Non-progressive cycle: state %d -> state %d", (*state)->num, current_state->num);
+ XBT_INFO("Non-progressive cycle: state %d -> state %d", (*state)->num_, current_state->num_);
XBT_INFO("******************************************");
XBT_INFO("*** NON-PROGRESSIVE CYCLE DETECTED ***");
XBT_INFO("******************************************");
{
RecordTrace res;
for (auto const& state : stack_)
- res.push_back(state->getTransition());
+ res.push_back(state->get_transition());
return res;
}
{
std::vector<std::string> trace;
for (auto const& state : stack_) {
- int value = state->transition.argument;
- smx_simcall_t req = &state->executed_req;
+ int value = state->transition_.argument_;
+ smx_simcall_t req = &state->executed_req_;
if (req)
trace.push_back(simgrid::mc::request_to_string(
req, value, simgrid::mc::RequestType::executed));
simgrid::mc::State* state = stack_.back().get();
XBT_DEBUG("**************************************************");
- XBT_VERB("Exploration depth=%zu (state=%p, num %d)(%zu interleave)", stack_.size(), state, state->num,
- state->interleaveSize());
+ XBT_VERB("Exploration depth=%zu (state=%p, num %d)(%zu interleave)", stack_.size(), state, state->num_,
+ state->interleave_size());
mc_model_checker->visited_states++;
// If there are processes to interleave and the maximum depth has not been
// reached then perform one step of the exploration algorithm.
- XBT_DEBUG("Execute: %s",
- simgrid::mc::request_to_string(
- req, state->transition.argument, simgrid::mc::RequestType::simix).c_str());
+ XBT_DEBUG(
+ "Execute: %s",
+ simgrid::mc::request_to_string(req, state->transition_.argument_, simgrid::mc::RequestType::simix).c_str());
std::string req_str;
if (dot_output != nullptr)
- req_str = simgrid::mc::request_get_dot_output(req, state->transition.argument);
+ req_str = simgrid::mc::request_get_dot_output(req, state->transition_.argument_);
mc_model_checker->executed_transitions++;
/* Actually answer the request: let execute the selected request (MCed does one step) */
- this->get_session().execute(state->transition);
+ this->get_session().execute(state->transition_);
/* Create the new expanded state (copy the state of MCed into our MCer data) */
std::unique_ptr<simgrid::mc::State> next_state =
for (auto& remoteActor : mc_model_checker->process().actors()) {
auto actor = remoteActor.copy.get_buffer();
if (simgrid::mc::actor_is_enabled(actor)) {
- next_state->addInterleavingSet(actor);
+ next_state->add_interleaving_set(actor);
if (reductionMode_ == simgrid::mc::ReductionMode::dpor)
break; // With DPOR, we take the first enabled transition
}
}
if (dot_output != nullptr)
- std::fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n",
- state->num, next_state->num, req_str.c_str());
+ std::fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num_, next_state->num_, req_str.c_str());
} else if (dot_output != nullptr)
- std::fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num,
+ std::fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num_,
visited_state_->original_num == -1 ? visited_state_->num : visited_state_->original_num,
req_str.c_str());
stack_.pop_back();
if (reductionMode_ == simgrid::mc::ReductionMode::dpor) {
smx_simcall_t req = &state->internal_req;
- if (req->call == SIMCALL_MUTEX_LOCK || req->call == SIMCALL_MUTEX_TRYLOCK)
+ if (req->call_ == SIMCALL_MUTEX_LOCK || req->call_ == SIMCALL_MUTEX_TRYLOCK)
xbt_die("Mutex is currently not supported with DPOR, use --cfg=model-check/reduction:none");
const smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
if (simgrid::mc::request_depend(req, &prev_state->internal_req)) {
if (XBT_LOG_ISENABLED(mc_safety, xbt_log_priority_debug)) {
XBT_DEBUG("Dependent Transitions:");
- int value = prev_state->transition.argument;
- smx_simcall_t prev_req = &prev_state->executed_req;
+ int value = prev_state->transition_.argument_;
+ smx_simcall_t prev_req = &prev_state->executed_req_;
XBT_DEBUG("%s (state=%d)",
- simgrid::mc::request_to_string(
- prev_req, value, simgrid::mc::RequestType::internal).c_str(),
- prev_state->num);
- value = state->transition.argument;
- prev_req = &state->executed_req;
+ simgrid::mc::request_to_string(prev_req, value, simgrid::mc::RequestType::internal).c_str(),
+ prev_state->num_);
+ value = state->transition_.argument_;
+ prev_req = &state->executed_req_;
XBT_DEBUG("%s (state=%d)",
- simgrid::mc::request_to_string(
- prev_req, value, simgrid::mc::RequestType::executed).c_str(),
- state->num);
+ simgrid::mc::request_to_string(prev_req, value, simgrid::mc::RequestType::executed).c_str(),
+ state->num_);
}
- if (not prev_state->actorStates[issuer->get_pid()].isDone())
- prev_state->addInterleavingSet(issuer);
+ if (not prev_state->actor_states_[issuer->get_pid()].is_done())
+ prev_state->add_interleaving_set(issuer);
else
- XBT_DEBUG("Process %p is in done set", req->issuer);
+ XBT_DEBUG("Process %p is in done set", req->issuer_);
break;
- } else if (req->issuer == prev_state->internal_req.issuer) {
+ } else if (req->issuer_ == prev_state->internal_req.issuer_) {
- XBT_DEBUG("Simcall %d and %d with same issuer", req->call, prev_state->internal_req.call);
+ XBT_DEBUG("Simcall %d and %d with same issuer", req->call_, prev_state->internal_req.call_);
break;
} else {
const smx_actor_t previous_issuer = MC_smx_simcall_get_issuer(&prev_state->internal_req);
XBT_DEBUG("Simcall %d, process %ld (state %d) and simcall %d, process %ld (state %d) are independent",
- req->call, issuer->get_pid(), state->num, prev_state->internal_req.call, previous_issuer->get_pid(),
- prev_state->num);
+ req->call_, issuer->get_pid(), state->num_, prev_state->internal_req.call_,
+ previous_issuer->get_pid(), prev_state->num_);
}
}
}
- if (state->interleaveSize()
- && stack_.size() < (std::size_t) _sg_mc_max_depth) {
+ if (state->interleave_size() && stack_.size() < (std::size_t)_sg_mc_max_depth) {
/* We found a back-tracking point, let's loop */
- XBT_DEBUG("Back-tracking to state %d at depth %zu", state->num, stack_.size() + 1);
+ XBT_DEBUG("Back-tracking to state %d at depth %zu", state->num_, stack_.size() + 1);
stack_.push_back(std::move(state));
this->restore_state();
- XBT_DEBUG("Back-tracking to state %d at depth %zu done", stack_.back()->num, stack_.size());
+ XBT_DEBUG("Back-tracking to state %d at depth %zu done", stack_.back()->num_, stack_.size());
break;
} else {
- XBT_DEBUG("Delete state %d at depth %zu", state->num, stack_.size() + 1);
+ XBT_DEBUG("Delete state %d at depth %zu", state->num_, stack_.size() + 1);
}
}
}
for (std::unique_ptr<simgrid::mc::State> const& state : stack_) {
if (state == stack_.back())
break;
- session->execute(state->transition);
+ session->execute(state->transition_);
/* Update statistics */
mc_model_checker->visited_states++;
mc_model_checker->executed_transitions++;
/* Get an enabled actor and insert it in the interleave set of the initial state */
for (auto& actor : mc_model_checker->process().actors())
if (simgrid::mc::actor_is_enabled(actor.copy.get_buffer())) {
- initial_state->addInterleavingSet(actor.copy.get_buffer());
+ initial_state->add_interleaving_set(actor.copy.get_buffer());
if (reductionMode_ != simgrid::mc::ReductionMode::none)
break;
}
simix_global->run_all_actors();
for (smx_actor_t const& process : simix_global->actors_that_ran) {
smx_simcall_t req = &process->simcall;
- if (req->call != SIMCALL_NONE && not simgrid::mc::request_is_visible(req))
+ if (req->call_ != SIMCALL_NONE && not simgrid::mc::request_is_visible(req))
process->simcall_handle(0);
}
}
// Now, we are in the client app, no need for remote memory reading.
smx_simcall_t req = &actor->simcall;
- if (req->transition != nullptr)
- return req->transition->fireable();
+ if (req->transition_ != nullptr)
+ return req->transition_->fireable();
- switch (req->call) {
+ switch (req->call_) {
case SIMCALL_NONE:
return false;
if (mutex->owner_ == nullptr)
return true;
- return mutex->owner_->get_pid() == req->issuer->get_pid();
+ return mutex->owner_->get_pid() == req->issuer_->get_pid();
}
case SIMCALL_SEM_ACQUIRE: {
xbt_assert(mc_model_checker == nullptr, "This should be called from the client side");
#endif
- return (req->transition != nullptr && req->transition->visible()) || req->call == SIMCALL_COMM_ISEND ||
- req->call == SIMCALL_COMM_IRECV || req->call == SIMCALL_COMM_WAIT || req->call == SIMCALL_COMM_WAITANY ||
- req->call == SIMCALL_COMM_TEST || req->call == SIMCALL_COMM_TESTANY || req->call == SIMCALL_MC_RANDOM ||
- req->call == SIMCALL_MUTEX_LOCK || req->call == SIMCALL_MUTEX_TRYLOCK || req->call == SIMCALL_MUTEX_UNLOCK;
+ return (req->transition_ != nullptr && req->transition_->visible()) || req->call_ == SIMCALL_COMM_ISEND ||
+ req->call_ == SIMCALL_COMM_IRECV || req->call_ == SIMCALL_COMM_WAIT || req->call_ == SIMCALL_COMM_WAITANY ||
+ req->call_ == SIMCALL_COMM_TEST || req->call_ == SIMCALL_COMM_TESTANY || req->call_ == SIMCALL_MC_RANDOM ||
+ req->call_ == SIMCALL_MUTEX_LOCK || req->call_ == SIMCALL_MUTEX_TRYLOCK || req->call_ == SIMCALL_MUTEX_UNLOCK;
}
}
std::uniform_int_distribution<int> prng(min, max);
return prng(rnd_engine);
}
- return simcall->mc_value;
+ return simcall->mc_value_;
}
void MC_restore_communications_pattern(simgrid::mc::State* state)
{
for (unsigned i = 0; i < initial_communications_pattern.size(); i++)
- initial_communications_pattern[i].index_comm = state->communicationIndices[i];
+ initial_communications_pattern[i].index_comm = state->communication_indices_[i];
for (unsigned i = 0; i < MC_smx_get_maxpid(); i++)
- MC_patterns_copy(incomplete_communications_pattern[i], state->incomplete_comm_pattern[i]);
+ MC_patterns_copy(incomplete_communications_pattern[i], state->incomplete_comm_pattern_[i]);
}
void MC_state_copy_incomplete_communications_pattern(simgrid::mc::State* state)
{
- state->incomplete_comm_pattern.clear();
+ state->incomplete_comm_pattern_.clear();
for (unsigned i=0; i < MC_smx_get_maxpid(); i++) {
std::vector<simgrid::mc::PatternCommunication> res;
for (auto const& comm : incomplete_communications_pattern[i])
res.push_back(comm->dup());
- state->incomplete_comm_pattern.push_back(std::move(res));
+ state->incomplete_comm_pattern_.push_back(std::move(res));
}
}
void MC_state_copy_index_communications_pattern(simgrid::mc::State* state)
{
- state->communicationIndices.clear();
+ state->communication_indices_.clear();
for (auto const& list_process_comm : initial_communications_pattern)
- state->communicationIndices.push_back(list_process_comm.index_comm);
+ state->communication_indices_.push_back(list_process_comm.index_comm);
}
void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t req, int value, int backtracking)
static inline e_mc_call_type_t MC_get_call_type(smx_simcall_t req)
{
- switch (req->call) {
+ switch (req->call_) {
case SIMCALL_COMM_ISEND:
return MC_CALL_TYPE_SEND;
case SIMCALL_COMM_IRECV:
simgrid::mc::wait_for_requests();
for (simgrid::mc::Transition const& transition : trace) {
- XBT_DEBUG("Executing %i$%i", transition.pid, transition.argument);
+ XBT_DEBUG("Executing %i$%i", transition.pid_, transition.argument_);
// Choose a request:
- smx_actor_t process = SIMIX_process_from_PID(transition.pid);
+ smx_actor_t process = SIMIX_process_from_PID(transition.pid_);
if (not process)
- xbt_die("Unexpected process (pid:%d).", transition.pid);
+ xbt_die("Unexpected process (pid:%d).", transition.pid_);
smx_simcall_t simcall = &(process->simcall);
- if (not simcall || simcall->call == SIMCALL_NONE)
- xbt_die("No simcall for process %d.", transition.pid);
+ if (not simcall || simcall->call_ == SIMCALL_NONE)
+ xbt_die("No simcall for process %d.", transition.pid_);
if (not simgrid::mc::request_is_visible(simcall) || not simgrid::mc::actor_is_enabled(process))
xbt_die("Unexpected simcall.");
// Execute the request:
- simcall->issuer->simcall_handle(transition.argument);
+ simcall->issuer_->simcall_handle(transition.argument_);
simgrid::mc::wait_for_requests();
}
}
while (*current) {
simgrid::mc::Transition item;
- int count = sscanf(current, "%d/%d", &item.pid, &item.argument);
+ int count = sscanf(current, "%d/%d", &item.pid_, &item.argument_);
if(count != 2 && count != 1)
throw std::invalid_argument("Could not parse record path");
res.push_back(item);
for (auto i = trace.begin(); i != trace.end(); ++i) {
if (i != trace.begin())
stream << ';';
- stream << i->pid;
- if (i->argument)
- stream << '/' << i->argument;
+ stream << i->pid_;
+ if (i->argument_)
+ stream << '/' << i->argument_;
}
return stream.str();
}
static inline simgrid::kernel::activity::CommImpl* MC_get_comm(smx_simcall_t r)
{
- switch (r->call ) {
- case SIMCALL_COMM_WAIT:
- return static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(r));
- case SIMCALL_COMM_TEST:
- return static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_test__getraw__comm(r));
- default:
- return nullptr;
+ switch (r->call_) {
+ case SIMCALL_COMM_WAIT:
+ return static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(r));
+ case SIMCALL_COMM_TEST:
+ return static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_test__getraw__comm(r));
+ default:
+ return nullptr;
}
}
static inline
smx_mailbox_t MC_get_mbox(smx_simcall_t r)
{
- switch(r->call) {
- case SIMCALL_COMM_ISEND:
- return simcall_comm_isend__get__mbox(r);
- case SIMCALL_COMM_IRECV:
- return simcall_comm_irecv__get__mbox(r);
- default:
- return nullptr;
+ switch (r->call_) {
+ case SIMCALL_COMM_ISEND:
+ return simcall_comm_isend__get__mbox(r);
+ case SIMCALL_COMM_IRECV:
+ return simcall_comm_irecv__get__mbox(r);
+ default:
+ return nullptr;
}
}
static inline
bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2)
{
- if (r1->call == SIMCALL_COMM_ISEND && r2->call == SIMCALL_COMM_IRECV)
+ if (r1->call_ == SIMCALL_COMM_ISEND && r2->call_ == SIMCALL_COMM_IRECV)
return false;
- if (r1->call == SIMCALL_COMM_IRECV && r2->call == SIMCALL_COMM_ISEND)
+ if (r1->call_ == SIMCALL_COMM_IRECV && r2->call_ == SIMCALL_COMM_ISEND)
return false;
// Those are internal requests, we do not need indirection
simgrid::kernel::activity::CommImpl* synchro1 = MC_get_comm(r1);
simgrid::kernel::activity::CommImpl* synchro2 = MC_get_comm(r2);
- if ((r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
- && r2->call == SIMCALL_COMM_WAIT) {
+ if ((r1->call_ == SIMCALL_COMM_ISEND || r1->call_ == SIMCALL_COMM_IRECV) && r2->call_ == SIMCALL_COMM_WAIT) {
smx_mailbox_t mbox = MC_get_mbox(r1);
&& simcall_comm_wait__get__timeout(r2) <= 0)
return false;
- if ((r1->issuer != synchro2->src_actor_.get()) && (r1->issuer != synchro2->dst_actor_.get()) &&
+ if ((r1->issuer_ != synchro2->src_actor_.get()) && (r1->issuer_ != synchro2->dst_actor_.get()) &&
simcall_comm_wait__get__timeout(r2) <= 0)
return false;
- if ((r1->call == SIMCALL_COMM_ISEND) && (synchro2->type_ == kernel::activity::CommImpl::Type::SEND) &&
+ if ((r1->call_ == SIMCALL_COMM_ISEND) && (synchro2->type_ == kernel::activity::CommImpl::Type::SEND) &&
(synchro2->src_buff_ != simcall_comm_isend__get__src_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
return false;
- if ((r1->call == SIMCALL_COMM_IRECV) && (synchro2->type_ == kernel::activity::CommImpl::Type::RECEIVE) &&
+ if ((r1->call_ == SIMCALL_COMM_IRECV) && (synchro2->type_ == kernel::activity::CommImpl::Type::RECEIVE) &&
(synchro2->dst_buff_ != simcall_comm_irecv__get__dst_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
return false;
}
return false;
#endif
- if (r1->call == SIMCALL_COMM_WAIT && (r2->call == SIMCALL_COMM_WAIT || r2->call == SIMCALL_COMM_TEST) &&
+ if (r1->call_ == SIMCALL_COMM_WAIT && (r2->call_ == SIMCALL_COMM_WAIT || r2->call_ == SIMCALL_COMM_TEST) &&
(synchro1->src_actor_.get() == nullptr || synchro1->dst_actor_.get() == nullptr))
return false;
- if (r1->call == SIMCALL_COMM_TEST &&
+ if (r1->call_ == SIMCALL_COMM_TEST &&
(simcall_comm_test__get__comm(r1) == nullptr || synchro1->src_buff_ == nullptr || synchro1->dst_buff_ == nullptr))
return false;
- if (r1->call == SIMCALL_COMM_TEST && r2->call == SIMCALL_COMM_WAIT && synchro1->src_buff_ == synchro2->src_buff_ &&
+ if (r1->call_ == SIMCALL_COMM_TEST && r2->call_ == SIMCALL_COMM_WAIT && synchro1->src_buff_ == synchro2->src_buff_ &&
synchro1->dst_buff_ == synchro2->dst_buff_)
return false;
- if (r1->call == SIMCALL_COMM_WAIT && r2->call == SIMCALL_COMM_TEST && synchro1->src_buff_ != nullptr &&
+ if (r1->call_ == SIMCALL_COMM_WAIT && r2->call_ == SIMCALL_COMM_TEST && synchro1->src_buff_ != nullptr &&
synchro1->dst_buff_ != nullptr && synchro2->src_buff_ != nullptr && synchro2->dst_buff_ != nullptr &&
synchro1->dst_buff_ != synchro2->src_buff_ && synchro1->dst_buff_ != synchro2->dst_buff_ &&
synchro2->dst_buff_ != synchro1->src_buff_)
// Those are internal_req
bool request_depend(smx_simcall_t req1, smx_simcall_t req2)
{
- if (req1->issuer == req2->issuer)
+ if (req1->issuer_ == req2->issuer_)
return false;
/* Wait with timeout transitions are not considered by the independence theorem, thus we consider them as dependent with all other transitions */
- if ((req1->call == SIMCALL_COMM_WAIT && simcall_comm_wait__get__timeout(req1) > 0) ||
- (req2->call == SIMCALL_COMM_WAIT && simcall_comm_wait__get__timeout(req2) > 0))
+ if ((req1->call_ == SIMCALL_COMM_WAIT && simcall_comm_wait__get__timeout(req1) > 0) ||
+ (req2->call_ == SIMCALL_COMM_WAIT && simcall_comm_wait__get__timeout(req2) > 0))
return true;
- if (req1->call != req2->call)
+ if (req1->call_ != req2->call_)
return request_depend_asymmetric(req1, req2) && request_depend_asymmetric(req2, req1);
// Those are internal requests, we do not need indirection
simgrid::kernel::activity::CommImpl* synchro1 = MC_get_comm(req1);
simgrid::kernel::activity::CommImpl* synchro2 = MC_get_comm(req2);
- switch (req1->call) {
+ switch (req1->call_) {
case SIMCALL_COMM_ISEND:
return simcall_comm_isend__get__mbox(req1) == simcall_comm_isend__get__mbox(req2);
case SIMCALL_COMM_IRECV:
{
xbt_assert(mc_model_checker != nullptr, "Must be called from MCer");
- if (req->transition != nullptr)
- return req->transition->to_string();
+ if (req->transition_ != nullptr)
+ return req->transition_->to_string();
bool use_remote_comm = true;
switch(request_type) {
smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
- switch (req->call) {
-
- case SIMCALL_COMM_ISEND: {
- type = "iSend";
- char* p = pointer_to_string(simcall_comm_isend__get__src_buff(req));
- char* bs = buff_size_to_string(simcall_comm_isend__get__src_buff_size(req));
- if (issuer->get_host())
- args = bprintf("src=(%ld)%s (%s), buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
- MC_smx_actor_get_name(issuer), p, bs);
- else
- args = bprintf("src=(%ld)%s, buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_name(issuer), p, bs);
- xbt_free(bs);
- xbt_free(p);
- break;
- }
+ switch (req->call_) {
- case SIMCALL_COMM_IRECV: {
- size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
- size_t size = 0;
- if (remote_size)
- mc_model_checker->process().read_bytes(&size, sizeof(size),
- remote(remote_size));
-
- type = "iRecv";
- char* p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
- char* bs = buff_size_to_string(size);
- if (issuer->get_host())
- args = bprintf("dst=(%ld)%s (%s), buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
- MC_smx_actor_get_name(issuer), p, bs);
- else
- args = bprintf("dst=(%ld)%s, buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_name(issuer), p, bs);
- xbt_free(bs);
- xbt_free(p);
- break;
- }
+ case SIMCALL_COMM_ISEND: {
+ type = "iSend";
+ char* p = pointer_to_string(simcall_comm_isend__get__src_buff(req));
+ char* bs = buff_size_to_string(simcall_comm_isend__get__src_buff_size(req));
+ if (issuer->get_host())
+ args = bprintf("src=(%ld)%s (%s), buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
+ MC_smx_actor_get_name(issuer), p, bs);
+ else
+ args = bprintf("src=(%ld)%s, buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_name(issuer), p, bs);
+ xbt_free(bs);
+ xbt_free(p);
+ break;
+ }
- case SIMCALL_COMM_WAIT: {
- simgrid::kernel::activity::CommImpl* remote_act =
- static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(req));
- char* p;
- if (value == -1) {
- type = "WaitTimeout";
- p = pointer_to_string(remote_act);
- args = bprintf("comm=%s", p);
- } else {
- type = "Wait";
- p = pointer_to_string(remote_act);
+ case SIMCALL_COMM_IRECV: {
+ size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
+ size_t size = 0;
+ if (remote_size)
+ mc_model_checker->process().read_bytes(&size, sizeof(size), remote(remote_size));
+ type = "iRecv";
+ char* p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
+ char* bs = buff_size_to_string(size);
+ if (issuer->get_host())
+ args = bprintf("dst=(%ld)%s (%s), buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
+ MC_smx_actor_get_name(issuer), p, bs);
+ else
+ args = bprintf("dst=(%ld)%s, buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_name(issuer), p, bs);
+ xbt_free(bs);
+ xbt_free(p);
+ break;
+ }
+
+ case SIMCALL_COMM_WAIT: {
+ simgrid::kernel::activity::CommImpl* remote_act =
+ static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(req));
+ char* p;
+ if (value == -1) {
+ type = "WaitTimeout";
+ p = pointer_to_string(remote_act);
+ args = bprintf("comm=%s", p);
+ } else {
+ type = "Wait";
+ p = pointer_to_string(remote_act);
+
+ simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
+ simgrid::kernel::activity::CommImpl* act;
+ if (use_remote_comm) {
+ mc_model_checker->process().read(temp_synchro,
+ remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
+ act = temp_synchro.get_buffer();
+ } else
+ act = remote_act;
+
+ smx_actor_t src_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
+ smx_actor_t dst_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->dst_actor_.get()));
+ args = bprintf("comm=%s [(%ld)%s (%s)-> (%ld)%s (%s)]", p, src_proc ? src_proc->get_pid() : 0,
+ src_proc ? MC_smx_actor_get_host_name(src_proc) : "",
+ src_proc ? MC_smx_actor_get_name(src_proc) : "", dst_proc ? dst_proc->get_pid() : 0,
+ dst_proc ? MC_smx_actor_get_host_name(dst_proc) : "",
+ dst_proc ? MC_smx_actor_get_name(dst_proc) : "");
+ }
+ xbt_free(p);
+ break;
+ }
+
+ case SIMCALL_COMM_TEST: {
+ simgrid::kernel::activity::CommImpl* remote_act =
+ static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_test__getraw__comm(req));
simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
simgrid::kernel::activity::CommImpl* act;
if (use_remote_comm) {
} else
act = remote_act;
- smx_actor_t src_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
- smx_actor_t dst_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->dst_actor_.get()));
- args =
- bprintf("comm=%s [(%ld)%s (%s)-> (%ld)%s (%s)]", p, src_proc ? src_proc->get_pid() : 0,
- src_proc ? MC_smx_actor_get_host_name(src_proc) : "", src_proc ? MC_smx_actor_get_name(src_proc) : "",
- dst_proc ? dst_proc->get_pid() : 0, dst_proc ? MC_smx_actor_get_host_name(dst_proc) : "",
- dst_proc ? MC_smx_actor_get_name(dst_proc) : "");
+ char* p;
+ if (act->src_actor_.get() == nullptr || act->dst_actor_.get() == nullptr) {
+ type = "Test FALSE";
+ p = pointer_to_string(remote_act);
+ args = bprintf("comm=%s", p);
+ } else {
+ type = "Test TRUE";
+ p = pointer_to_string(remote_act);
+
+ smx_actor_t src_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
+ smx_actor_t dst_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->dst_actor_.get()));
+ args = bprintf("comm=%s [(%ld)%s (%s) -> (%ld)%s (%s)]", p, src_proc->get_pid(),
+ MC_smx_actor_get_name(src_proc), MC_smx_actor_get_host_name(src_proc), dst_proc->get_pid(),
+ MC_smx_actor_get_name(dst_proc), MC_smx_actor_get_host_name(dst_proc));
+ }
+ xbt_free(p);
+ break;
}
- xbt_free(p);
- break;
- }
- case SIMCALL_COMM_TEST: {
- simgrid::kernel::activity::CommImpl* remote_act =
- static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_test__getraw__comm(req));
- simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
- simgrid::kernel::activity::CommImpl* act;
- if (use_remote_comm) {
- mc_model_checker->process().read(temp_synchro,
- remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
- act = temp_synchro.get_buffer();
- } else
- act = remote_act;
-
- char* p;
- if (act->src_actor_.get() == nullptr || act->dst_actor_.get() == nullptr) {
- type = "Test FALSE";
- p = pointer_to_string(remote_act);
- args = bprintf("comm=%s", p);
- } else {
- type = "Test TRUE";
- p = pointer_to_string(remote_act);
-
- smx_actor_t src_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
- smx_actor_t dst_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->dst_actor_.get()));
- args = bprintf("comm=%s [(%ld)%s (%s) -> (%ld)%s (%s)]", p, src_proc->get_pid(), MC_smx_actor_get_name(src_proc),
- MC_smx_actor_get_host_name(src_proc), dst_proc->get_pid(), MC_smx_actor_get_name(dst_proc),
- MC_smx_actor_get_host_name(dst_proc));
+ case SIMCALL_COMM_WAITANY: {
+ type = "WaitAny";
+ size_t count = simcall_comm_waitany__get__count(req);
+ if (count > 0) {
+ simgrid::kernel::activity::CommImpl* remote_sync;
+ remote_sync = mc_model_checker->process().read(remote(simcall_comm_waitany__get__comms(req) + value));
+ char* p = pointer_to_string(remote_sync);
+ args = bprintf("comm=%s (%d of %zu)", p, value + 1, count);
+ xbt_free(p);
+ } else
+ args = bprintf("comm at idx %d", value);
+ break;
}
- xbt_free(p);
- break;
- }
- case SIMCALL_COMM_WAITANY: {
- type = "WaitAny";
- size_t count = simcall_comm_waitany__get__count(req);
- if (count > 0) {
- simgrid::kernel::activity::CommImpl* remote_sync;
- remote_sync = mc_model_checker->process().read(remote(simcall_comm_waitany__get__comms(req) + value));
- char* p = pointer_to_string(remote_sync);
- args = bprintf("comm=%s (%d of %zu)", p, value + 1, count);
- xbt_free(p);
- } else
- args = bprintf("comm at idx %d", value);
- break;
- }
-
- case SIMCALL_COMM_TESTANY:
- if (value == -1) {
- type = "TestAny FALSE";
- args = xbt_strdup("-");
- } else {
- type = "TestAny";
- args =
- bprintf("(%d of %zu)", value + 1,
- simcall_comm_testany__get__count(req));
+ case SIMCALL_COMM_TESTANY:
+ if (value == -1) {
+ type = "TestAny FALSE";
+ args = xbt_strdup("-");
+ } else {
+ type = "TestAny";
+ args = bprintf("(%d of %zu)", value + 1, simcall_comm_testany__get__count(req));
+ }
+ break;
+
+ case SIMCALL_MUTEX_TRYLOCK:
+ case SIMCALL_MUTEX_LOCK: {
+ if (req->call_ == SIMCALL_MUTEX_LOCK)
+ type = "Mutex LOCK";
+ else
+ type = "Mutex TRYLOCK";
+
+ simgrid::mc::Remote<simgrid::kernel::activity::MutexImpl> mutex;
+ mc_model_checker->process().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)));
+ args = bprintf("locked = %d, owner = %d, sleeping = n/a", mutex.get_buffer()->is_locked(),
+ mutex.get_buffer()->owner_ != nullptr
+ ? (int)mc_model_checker->process()
+ .resolve_actor(simgrid::mc::remote(mutex.get_buffer()->owner_))
+ ->get_pid()
+ : -1);
+ break;
}
- break;
-
- case SIMCALL_MUTEX_TRYLOCK:
- case SIMCALL_MUTEX_LOCK: {
- if (req->call == SIMCALL_MUTEX_LOCK)
- type = "Mutex LOCK";
- else
- type = "Mutex TRYLOCK";
-
- simgrid::mc::Remote<simgrid::kernel::activity::MutexImpl> mutex;
- mc_model_checker->process().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)));
- args = bprintf(
- "locked = %d, owner = %d, sleeping = n/a", mutex.get_buffer()->is_locked(),
- mutex.get_buffer()->owner_ != nullptr
- ? (int)mc_model_checker->process().resolve_actor(simgrid::mc::remote(mutex.get_buffer()->owner_))->get_pid()
- : -1);
- break;
- }
- case SIMCALL_MC_RANDOM:
- type = "MC_RANDOM";
- args = bprintf("%d", value);
- break;
+ case SIMCALL_MC_RANDOM:
+ type = "MC_RANDOM";
+ args = bprintf("%d", value);
+ break;
- default:
- type = SIMIX_simcall_name(req->call);
- args = bprintf("??");
- break;
+ default:
+ type = SIMIX_simcall_name(req->call_);
+ args = bprintf("??");
+ break;
}
std::string str;
bool request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
{
simgrid::kernel::activity::CommImpl* remote_act = nullptr;
- switch (req->call) {
+ switch (req->call_) {
- case SIMCALL_COMM_WAIT:
- /* FIXME: check also that src and dst processes are not suspended */
- remote_act = simcall_comm_wait__getraw__comm(req);
- break;
+ case SIMCALL_COMM_WAIT:
+ /* FIXME: check also that src and dst processes are not suspended */
+ remote_act = simcall_comm_wait__getraw__comm(req);
+ break;
- case SIMCALL_COMM_WAITANY:
- remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__get__comms(req) + idx));
- break;
+ case SIMCALL_COMM_WAITANY:
+ remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__get__comms(req) + idx));
+ break;
- case SIMCALL_COMM_TESTANY:
- remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__get__comms(req) + idx));
- break;
+ case SIMCALL_COMM_TESTANY:
+ remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__get__comms(req) + idx));
+ break;
- default:
- return true;
+ default:
+ return true;
}
simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
const smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
const char* color = get_color(issuer->get_pid() - 1);
- if (req->transition != nullptr)
+ if (req->transition_ != nullptr)
return simgrid::xbt::string_printf("label = \"%s\", color = %s, fontcolor = %s",
- req->transition->dot_label().c_str(), color, color);
+ req->transition_->dot_label().c_str(), color, color);
std::string label;
+ switch (req->call_) {
+ case SIMCALL_COMM_ISEND:
+ if (issuer->get_host())
+ label = simgrid::xbt::string_printf("[(%ld)%s] iSend", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
+ else
+ label = bprintf("[(%ld)] iSend", issuer->get_pid());
+ break;
- switch (req->call) {
- case SIMCALL_COMM_ISEND:
- if (issuer->get_host())
- label = simgrid::xbt::string_printf("[(%ld)%s] iSend", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
- else
- label = bprintf("[(%ld)] iSend", issuer->get_pid());
- break;
-
- case SIMCALL_COMM_IRECV:
- if (issuer->get_host())
- label = simgrid::xbt::string_printf("[(%ld)%s] iRecv", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
- else
- label = simgrid::xbt::string_printf("[(%ld)] iRecv", issuer->get_pid());
- break;
-
- case SIMCALL_COMM_WAIT:
- if (value == -1) {
+ case SIMCALL_COMM_IRECV:
if (issuer->get_host())
- label =
- simgrid::xbt::string_printf("[(%ld)%s] WaitTimeout", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
+ label = simgrid::xbt::string_printf("[(%ld)%s] iRecv", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
else
- label = simgrid::xbt::string_printf("[(%ld)] WaitTimeout", issuer->get_pid());
- } else {
- simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_wait__getraw__comm(req);
+ label = simgrid::xbt::string_printf("[(%ld)] iRecv", issuer->get_pid());
+ break;
+
+ case SIMCALL_COMM_WAIT:
+ if (value == -1) {
+ if (issuer->get_host())
+ label = simgrid::xbt::string_printf("[(%ld)%s] WaitTimeout", issuer->get_pid(),
+ MC_smx_actor_get_host_name(issuer));
+ else
+ label = simgrid::xbt::string_printf("[(%ld)] WaitTimeout", issuer->get_pid());
+ } else {
+ simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_wait__getraw__comm(req);
+ simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
+ mc_model_checker->process().read(temp_comm,
+ remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
+ simgrid::kernel::activity::CommImpl* comm = temp_comm.get_buffer();
+
+ smx_actor_t src_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(comm->src_actor_.get()));
+ smx_actor_t dst_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(comm->dst_actor_.get()));
+ if (issuer->get_host())
+ label = simgrid::xbt::string_printf("[(%ld)%s] Wait [(%ld)->(%ld)]", issuer->get_pid(),
+ MC_smx_actor_get_host_name(issuer), src_proc ? src_proc->get_pid() : 0,
+ dst_proc ? dst_proc->get_pid() : 0);
+ else
+ label = simgrid::xbt::string_printf("[(%ld)] Wait [(%ld)->(%ld)]", issuer->get_pid(),
+ src_proc ? src_proc->get_pid() : 0, dst_proc ? dst_proc->get_pid() : 0);
+ }
+ break;
+
+ case SIMCALL_COMM_TEST: {
+ simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_test__getraw__comm(req);
simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
mc_model_checker->process().read(temp_comm,
remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
simgrid::kernel::activity::CommImpl* comm = temp_comm.get_buffer();
-
- smx_actor_t src_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(comm->src_actor_.get()));
- smx_actor_t dst_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(comm->dst_actor_.get()));
- if (issuer->get_host())
- label = simgrid::xbt::string_printf("[(%ld)%s] Wait [(%ld)->(%ld)]", issuer->get_pid(),
- MC_smx_actor_get_host_name(issuer), src_proc ? src_proc->get_pid() : 0,
- dst_proc ? dst_proc->get_pid() : 0);
- else
- label = simgrid::xbt::string_printf("[(%ld)] Wait [(%ld)->(%ld)]", issuer->get_pid(),
- src_proc ? src_proc->get_pid() : 0, dst_proc ? dst_proc->get_pid() : 0);
+ if (comm->src_actor_.get() == nullptr || comm->dst_actor_.get() == nullptr) {
+ if (issuer->get_host())
+ label = simgrid::xbt::string_printf("[(%ld)%s] Test FALSE", issuer->get_pid(),
+ MC_smx_actor_get_host_name(issuer));
+ else
+ label = bprintf("[(%ld)] Test FALSE", issuer->get_pid());
+ } else {
+ if (issuer->get_host())
+ label =
+ simgrid::xbt::string_printf("[(%ld)%s] Test TRUE", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
+ else
+ label = simgrid::xbt::string_printf("[(%ld)] Test TRUE", issuer->get_pid());
+ }
+ break;
}
- break;
- case SIMCALL_COMM_TEST: {
- simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_test__getraw__comm(req);
- simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
- mc_model_checker->process().read(temp_comm, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
- simgrid::kernel::activity::CommImpl* comm = temp_comm.get_buffer();
- if (comm->src_actor_.get() == nullptr || comm->dst_actor_.get() == nullptr) {
- if (issuer->get_host())
- label =
- simgrid::xbt::string_printf("[(%ld)%s] Test FALSE", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
- else
- label = bprintf("[(%ld)] Test FALSE", issuer->get_pid());
- } else {
+ case SIMCALL_COMM_WAITANY: {
+ size_t comms_size = simcall_comm_waitany__get__count(req);
if (issuer->get_host())
- label =
- simgrid::xbt::string_printf("[(%ld)%s] Test TRUE", issuer->get_pid(), MC_smx_actor_get_host_name(issuer));
+ label = simgrid::xbt::string_printf("[(%ld)%s] WaitAny [%d of %zu]", issuer->get_pid(),
+ MC_smx_actor_get_host_name(issuer), value + 1, comms_size);
else
- label = simgrid::xbt::string_printf("[(%ld)] Test TRUE", issuer->get_pid());
+ label = simgrid::xbt::string_printf("[(%ld)] WaitAny [%d of %zu]", issuer->get_pid(), value + 1, comms_size);
+ break;
}
- break;
- }
- case SIMCALL_COMM_WAITANY: {
- size_t comms_size = simcall_comm_waitany__get__count(req);
- if (issuer->get_host())
- label = simgrid::xbt::string_printf("[(%ld)%s] WaitAny [%d of %zu]", issuer->get_pid(),
- MC_smx_actor_get_host_name(issuer), value + 1, comms_size);
- else
- label = simgrid::xbt::string_printf("[(%ld)] WaitAny [%d of %zu]", issuer->get_pid(), value + 1, comms_size);
- break;
- }
-
- case SIMCALL_COMM_TESTANY:
- if (value == -1) {
- if (issuer->get_host())
- label = simgrid::xbt::string_printf("[(%ld)%s] TestAny FALSE", issuer->get_pid(),
- MC_smx_actor_get_host_name(issuer));
- else
- label = simgrid::xbt::string_printf("[(%ld)] TestAny FALSE", issuer->get_pid());
- } else {
+ case SIMCALL_COMM_TESTANY:
+ if (value == -1) {
+ if (issuer->get_host())
+ label = simgrid::xbt::string_printf("[(%ld)%s] TestAny FALSE", issuer->get_pid(),
+ MC_smx_actor_get_host_name(issuer));
+ else
+ label = simgrid::xbt::string_printf("[(%ld)] TestAny FALSE", issuer->get_pid());
+ } else {
+ if (issuer->get_host())
+ label = simgrid::xbt::string_printf("[(%ld)%s] TestAny TRUE [%d of %lu]", issuer->get_pid(),
+ MC_smx_actor_get_host_name(issuer), value + 1,
+ simcall_comm_testany__get__count(req));
+ else
+ label = simgrid::xbt::string_printf("[(%ld)] TestAny TRUE [%d of %lu]", issuer->get_pid(), value + 1,
+ simcall_comm_testany__get__count(req));
+ }
+ break;
+
+ case SIMCALL_MUTEX_TRYLOCK:
+ label = simgrid::xbt::string_printf("[(%ld)] Mutex TRYLOCK", issuer->get_pid());
+ break;
+
+ case SIMCALL_MUTEX_LOCK:
+ label = simgrid::xbt::string_printf("[(%ld)] Mutex LOCK", issuer->get_pid());
+ break;
+
+ case SIMCALL_MC_RANDOM:
if (issuer->get_host())
- label = simgrid::xbt::string_printf("[(%ld)%s] TestAny TRUE [%d of %lu]", issuer->get_pid(),
- MC_smx_actor_get_host_name(issuer), value + 1,
- simcall_comm_testany__get__count(req));
+ label = simgrid::xbt::string_printf("[(%ld)%s] MC_RANDOM (%d)", issuer->get_pid(),
+ MC_smx_actor_get_host_name(issuer), value);
else
- label = simgrid::xbt::string_printf("[(%ld)] TestAny TRUE [%d of %lu]", issuer->get_pid(), value + 1,
- simcall_comm_testany__get__count(req));
- }
- break;
-
- case SIMCALL_MUTEX_TRYLOCK:
- label = simgrid::xbt::string_printf("[(%ld)] Mutex TRYLOCK", issuer->get_pid());
- break;
-
- case SIMCALL_MUTEX_LOCK:
- label = simgrid::xbt::string_printf("[(%ld)] Mutex LOCK", issuer->get_pid());
- break;
-
- case SIMCALL_MC_RANDOM:
- if (issuer->get_host())
- label = simgrid::xbt::string_printf("[(%ld)%s] MC_RANDOM (%d)", issuer->get_pid(),
- MC_smx_actor_get_host_name(issuer), value);
- else
- label = simgrid::xbt::string_printf("[(%ld)] MC_RANDOM (%d)", issuer->get_pid(), value);
- break;
+ label = simgrid::xbt::string_printf("[(%ld)] MC_RANDOM (%d)", issuer->get_pid(), value);
+ break;
- default:
- THROW_UNIMPLEMENTED;
+ default:
+ THROW_UNIMPLEMENTED;
}
return simgrid::xbt::string_printf(
xbt_assert(mc_model_checker != nullptr);
// This is the address of the smx_actor in the MCed process:
- auto address = simgrid::mc::remote(req->issuer);
+ auto address = simgrid::mc::remote(req->issuer_);
// Lookup by address:
for (auto& actor : mc_model_checker->process().actors())
namespace simgrid {
namespace mc {
-State::State(unsigned long state_number) : num(state_number)
+State::State(unsigned long state_number) : num_(state_number)
{
this->internal_comm.clear();
std::memset(&this->internal_req, 0, sizeof(this->internal_req));
- std::memset(&this->executed_req, 0, sizeof(this->executed_req));
+ std::memset(&this->executed_req_, 0, sizeof(this->executed_req_));
- actorStates.resize(MC_smx_get_maxpid());
+ actor_states_.resize(MC_smx_get_maxpid());
/* Stateful model checking */
if ((_sg_mc_checkpoint > 0 && (state_number % _sg_mc_checkpoint == 0)) || _sg_mc_termination) {
- system_state = std::make_shared<simgrid::mc::Snapshot>(num);
+ system_state = std::make_shared<simgrid::mc::Snapshot>(num_);
if (_sg_mc_comms_determinism || _sg_mc_send_determinism) {
MC_state_copy_incomplete_communications_pattern(this);
MC_state_copy_index_communications_pattern(this);
}
}
-std::size_t State::interleaveSize() const
+std::size_t State::interleave_size() const
{
- return boost::range::count_if(this->actorStates, [](simgrid::mc::ProcessState const& p) { return p.isTodo(); });
+ return boost::range::count_if(this->actor_states_, [](simgrid::mc::ProcessState const& p) { return p.is_todo(); });
}
-Transition State::getTransition() const
+Transition State::get_transition() const
{
- return this->transition;
+ return this->transition_;
}
}
static inline smx_simcall_t MC_state_get_request_for_process(simgrid::mc::State* state, smx_actor_t actor)
{
/* reset the outgoing transition */
- simgrid::mc::ProcessState* procstate = &state->actorStates[actor->get_pid()];
- state->transition.pid = -1;
- state->transition.argument = -1;
- state->executed_req.call = SIMCALL_NONE;
+ simgrid::mc::ProcessState* procstate = &state->actor_states_[actor->get_pid()];
+ state->transition_.pid_ = -1;
+ state->transition_.argument_ = -1;
+ state->executed_req_.call_ = SIMCALL_NONE;
if (not simgrid::mc::actor_is_enabled(actor))
return nullptr; // Not executable in the application
smx_simcall_t req = nullptr;
- switch (actor->simcall.call) {
+ switch (actor->simcall.call_) {
case SIMCALL_COMM_WAITANY:
- state->transition.argument = -1;
+ state->transition_.argument_ = -1;
while (procstate->times_considered < simcall_comm_waitany__get__count(&actor->simcall)) {
if (simgrid::mc::request_is_enabled_by_idx(&actor->simcall, procstate->times_considered)) {
- state->transition.argument = procstate->times_considered;
+ state->transition_.argument_ = procstate->times_considered;
++procstate->times_considered;
break;
}
}
if (procstate->times_considered >= simcall_comm_waitany__get__count(&actor->simcall))
- procstate->setDone();
- if (state->transition.argument != -1)
+ procstate->set_done();
+ if (state->transition_.argument_ != -1)
req = &actor->simcall;
break;
case SIMCALL_COMM_TESTANY: {
unsigned start_count = procstate->times_considered;
- state->transition.argument = -1;
+ state->transition_.argument_ = -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)) {
- state->transition.argument = procstate->times_considered;
+ state->transition_.argument_ = procstate->times_considered;
++procstate->times_considered;
break;
}
}
if (procstate->times_considered >= simcall_comm_testany__get__count(&actor->simcall))
- procstate->setDone();
+ procstate->set_done();
- if (state->transition.argument != -1 || start_count == 0)
+ if (state->transition_.argument_ != -1 || start_count == 0)
req = &actor->simcall;
break;
mc_model_checker->process().read(temp_act, remote_act);
simgrid::kernel::activity::CommImpl* act = temp_act.get_buffer();
if (act->src_actor_.get() && act->dst_actor_.get())
- state->transition.argument = 0;
+ state->transition_.argument_ = 0;
else if (act->src_actor_.get() == nullptr && act->type_ == simgrid::kernel::activity::CommImpl::Type::READY &&
act->detached())
- state->transition.argument = 0;
+ state->transition_.argument_ = 0;
else
- state->transition.argument = -1;
- procstate->setDone();
+ state->transition_.argument_ = -1;
+ procstate->set_done();
req = &actor->simcall;
break;
}
case SIMCALL_MC_RANDOM: {
int min_value = simcall_mc_random__get__min(&actor->simcall);
- state->transition.argument = procstate->times_considered + min_value;
+ state->transition_.argument_ = procstate->times_considered + min_value;
procstate->times_considered++;
- if (state->transition.argument == simcall_mc_random__get__max(&actor->simcall))
- procstate->setDone();
+ if (state->transition_.argument_ == simcall_mc_random__get__max(&actor->simcall))
+ procstate->set_done();
req = &actor->simcall;
break;
}
default:
- procstate->setDone();
- state->transition.argument = 0;
+ procstate->set_done();
+ state->transition_.argument_ = 0;
req = &actor->simcall;
break;
}
if (not req)
return nullptr;
- state->transition.pid = actor->get_pid();
- state->executed_req = *req;
+ state->transition_.pid_ = actor->get_pid();
+ state->executed_req_ = *req;
// Fetch the data of the request and translate it:
state->internal_req = *req;
/* The waitany and testany request are transformed into a wait or test request over the corresponding communication
* action so it can be treated later by the dependence function. */
- switch (req->call) {
- case SIMCALL_COMM_WAITANY: {
- state->internal_req.call = SIMCALL_COMM_WAIT;
- simgrid::kernel::activity::CommImpl* remote_comm;
- remote_comm =
- mc_model_checker->process().read(remote(simcall_comm_waitany__get__comms(req) + state->transition.argument));
- mc_model_checker->process().read(state->internal_comm, remote(remote_comm));
- simcall_comm_wait__set__comm(&state->internal_req, state->internal_comm.get_buffer());
- simcall_comm_wait__set__timeout(&state->internal_req, 0);
- break;
- }
-
- case SIMCALL_COMM_TESTANY:
- state->internal_req.call = SIMCALL_COMM_TEST;
-
- if (state->transition.argument > 0) {
- simgrid::kernel::activity::CommImpl* remote_comm =
- mc_model_checker->process().read(remote(simcall_comm_testany__get__comms(req) + state->transition.argument));
+ switch (req->call_) {
+ case SIMCALL_COMM_WAITANY: {
+ state->internal_req.call_ = SIMCALL_COMM_WAIT;
+ simgrid::kernel::activity::CommImpl* remote_comm;
+ remote_comm = mc_model_checker->process().read(
+ remote(simcall_comm_waitany__get__comms(req) + state->transition_.argument_));
mc_model_checker->process().read(state->internal_comm, remote(remote_comm));
+ simcall_comm_wait__set__comm(&state->internal_req, state->internal_comm.get_buffer());
+ simcall_comm_wait__set__timeout(&state->internal_req, 0);
+ break;
}
- simcall_comm_test__set__comm(&state->internal_req, state->internal_comm.get_buffer());
- simcall_comm_test__set__result(&state->internal_req, state->transition.argument);
- break;
-
- case SIMCALL_COMM_WAIT:
- mc_model_checker->process().read_bytes(&state->internal_comm, sizeof(state->internal_comm),
- remote(simcall_comm_wait__getraw__comm(req)));
- simcall_comm_wait__set__comm(&state->executed_req, state->internal_comm.get_buffer());
- simcall_comm_wait__set__comm(&state->internal_req, state->internal_comm.get_buffer());
- break;
-
- case SIMCALL_COMM_TEST:
- mc_model_checker->process().read_bytes(&state->internal_comm, sizeof(state->internal_comm),
- remote(simcall_comm_test__getraw__comm(req)));
- simcall_comm_test__set__comm(&state->executed_req, state->internal_comm.get_buffer());
- simcall_comm_test__set__comm(&state->internal_req, state->internal_comm.get_buffer());
- break;
-
- default:
- /* No translation needed */
- break;
+ case SIMCALL_COMM_TESTANY:
+ state->internal_req.call_ = SIMCALL_COMM_TEST;
+
+ if (state->transition_.argument_ > 0) {
+ simgrid::kernel::activity::CommImpl* remote_comm = mc_model_checker->process().read(
+ remote(simcall_comm_testany__get__comms(req) + state->transition_.argument_));
+ mc_model_checker->process().read(state->internal_comm, remote(remote_comm));
+ }
+
+ simcall_comm_test__set__comm(&state->internal_req, state->internal_comm.get_buffer());
+ simcall_comm_test__set__result(&state->internal_req, state->transition_.argument_);
+ break;
+
+ case SIMCALL_COMM_WAIT:
+ mc_model_checker->process().read_bytes(&state->internal_comm, sizeof(state->internal_comm),
+ remote(simcall_comm_wait__getraw__comm(req)));
+ simcall_comm_wait__set__comm(&state->executed_req_, state->internal_comm.get_buffer());
+ simcall_comm_wait__set__comm(&state->internal_req, state->internal_comm.get_buffer());
+ break;
+
+ case SIMCALL_COMM_TEST:
+ mc_model_checker->process().read_bytes(&state->internal_comm, sizeof(state->internal_comm),
+ remote(simcall_comm_test__getraw__comm(req)));
+ simcall_comm_test__set__comm(&state->executed_req_, state->internal_comm.get_buffer());
+ simcall_comm_test__set__comm(&state->internal_req, state->internal_comm.get_buffer());
+ break;
+
+ default:
+ /* No translation needed */
+ break;
}
return req;
{
for (auto& actor : mc_model_checker->process().actors()) {
/* Only consider the actors that were marked as interleaving by the checker algorithm */
- if (not state->actorStates[actor.copy.get_buffer()->get_pid()].isTodo())
+ if (not state->actor_states_[actor.copy.get_buffer()->get_pid()].is_todo())
continue;
smx_simcall_t res = MC_state_get_request_for_process(state, actor.copy.get_buffer());
* Either the checker did not consider the transition, or it was considered and to do, or considered and done.
*/
enum class InterleavingType {
- /** This process transition is not considered by the checker (yet?) */
+ /** This actor transition is not considered by the checker (yet?) */
disabled = 0,
- /** The checker algorithm decided that this process transitions should be done at some point */
+ /** The checker algorithm decided that this actor transitions should be done at some point */
todo,
/** The checker algorithm decided that this should be done, but it was done in the meanwhile */
done,
// TODO, make this private
unsigned int times_considered = 0;
- bool isDisabled() const { return this->state == InterleavingType::disabled; }
- bool isDone() const { return this->state == InterleavingType::done; }
- bool isTodo() const { return this->state == InterleavingType::todo; }
+ bool is_disabled() const { return this->state == InterleavingType::disabled; }
+ bool is_done() const { return this->state == InterleavingType::done; }
+ bool is_todo() const { return this->state == InterleavingType::todo; }
/** Mark that we should try executing this process at some point in the future of the checker algorithm */
void consider()
{
this->state = InterleavingType::todo;
this->times_considered = 0;
}
- void setDone() { this->state = InterleavingType::done; }
+ void set_done() { this->state = InterleavingType::done; }
};
/* A node in the exploration graph (kind-of)
class XBT_PRIVATE State {
public:
/** Sequential state number (used for debugging) */
- int num = 0;
+ int num_ = 0;
/** State's exploration status by process */
- std::vector<ProcessState> actorStates;
+ std::vector<ProcessState> actor_states_;
- Transition transition;
+ Transition transition_;
/** The simcall which was executed, going out of that state */
- s_smx_simcall executed_req;
+ s_smx_simcall executed_req_;
/* Internal translation of the executed_req simcall
*
std::shared_ptr<simgrid::mc::Snapshot> system_state;
// For CommunicationDeterminismChecker
- std::vector<std::vector<simgrid::mc::PatternCommunication>> incomplete_comm_pattern;
- std::vector<unsigned> communicationIndices;
+ std::vector<std::vector<simgrid::mc::PatternCommunication>> incomplete_comm_pattern_;
+ std::vector<unsigned> communication_indices_;
explicit State(unsigned long state_number);
- std::size_t interleaveSize() const;
- void addInterleavingSet(smx_actor_t actor) { this->actorStates[actor->get_pid()].consider(); }
- Transition getTransition() const;
+ std::size_t interleave_size() const;
+ void add_interleaving_set(smx_actor_t actor) { this->actor_states_[actor->get_pid()].consider(); }
+ Transition get_transition() const;
};
}
}
void simcall_run_kernel(std::function<void()> const& code, simgrid::kernel::actor::Transition* t)
{
- SIMIX_process_self()->simcall.transition = t;
+ SIMIX_process_self()->simcall.transition_ = t;
simcall_BODY_run_kernel(&code);
}
void simcall_run_blocking(std::function<void()> const& code, simgrid::kernel::actor::Transition* t = nullptr)
{
- SIMIX_process_self()->simcall.transition = t;
+ SIMIX_process_self()->simcall.transition_ = t;
simcall_BODY_run_blocking(&code);
}
#include "src/simix/popping_private.hpp"
static inline simgrid::kernel::activity::ExecImpl* simcall_execution_wait__get__execution(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall->args_[0]);
}
static inline simgrid::kernel::activity::ExecImpl* simcall_execution_wait__getraw__execution(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl*>(simcall->args_[0]);
}
static inline void simcall_execution_wait__set__execution(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl* arg)
{
- simgrid::simix::marshal<simgrid::kernel::activity::ExecImpl*>(simcall->args[0], arg);
+ simgrid::simix::marshal<simgrid::kernel::activity::ExecImpl*>(simcall->args_[0], arg);
}
static inline int simcall_execution_wait__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->result);
+ return simgrid::simix::unmarshal<int>(simcall->result_);
}
static inline int simcall_execution_wait__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->result);
+ return simgrid::simix::unmarshal_raw<int>(simcall->result_);
}
static inline void simcall_execution_wait__set__result(smx_simcall_t simcall, int result)
{
- simgrid::simix::marshal<int>(simcall->result, result);
+ simgrid::simix::marshal<int>(simcall->result_, result);
}
static inline simgrid::kernel::activity::ExecImpl** simcall_execution_waitany_for__get__execs(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl**>(simcall->args[0]);
+ return simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl**>(simcall->args_[0]);
}
static inline simgrid::kernel::activity::ExecImpl** simcall_execution_waitany_for__getraw__execs(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl**>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl**>(simcall->args_[0]);
}
static inline void simcall_execution_waitany_for__set__execs(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl** arg)
{
- simgrid::simix::marshal<simgrid::kernel::activity::ExecImpl**>(simcall->args[0], arg);
+ simgrid::simix::marshal<simgrid::kernel::activity::ExecImpl**>(simcall->args_[0], arg);
}
static inline size_t simcall_execution_waitany_for__get__count(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<size_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal<size_t>(simcall->args_[1]);
}
static inline size_t simcall_execution_waitany_for__getraw__count(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<size_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<size_t>(simcall->args_[1]);
}
static inline void simcall_execution_waitany_for__set__count(smx_simcall_t simcall, size_t arg)
{
- simgrid::simix::marshal<size_t>(simcall->args[1], arg);
+ simgrid::simix::marshal<size_t>(simcall->args_[1], arg);
}
static inline double simcall_execution_waitany_for__get__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[2]);
}
static inline double simcall_execution_waitany_for__getraw__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[2]);
}
static inline void simcall_execution_waitany_for__set__timeout(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[2], arg);
+ simgrid::simix::marshal<double>(simcall->args_[2], arg);
}
static inline int simcall_execution_waitany_for__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->result);
+ return simgrid::simix::unmarshal<int>(simcall->result_);
}
static inline int simcall_execution_waitany_for__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->result);
+ return simgrid::simix::unmarshal_raw<int>(simcall->result_);
}
static inline void simcall_execution_waitany_for__set__result(smx_simcall_t simcall, int result)
{
- simgrid::simix::marshal<int>(simcall->result, result);
+ simgrid::simix::marshal<int>(simcall->result_, result);
}
static inline simgrid::kernel::activity::ExecImpl* simcall_execution_test__get__execution(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall->args_[0]);
}
static inline simgrid::kernel::activity::ExecImpl* simcall_execution_test__getraw__execution(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl*>(simcall->args_[0]);
}
static inline void simcall_execution_test__set__execution(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl* arg)
{
- simgrid::simix::marshal<simgrid::kernel::activity::ExecImpl*>(simcall->args[0], arg);
+ simgrid::simix::marshal<simgrid::kernel::activity::ExecImpl*>(simcall->args_[0], arg);
}
static inline bool simcall_execution_test__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<bool>(simcall->result);
+ return simgrid::simix::unmarshal<bool>(simcall->result_);
}
static inline bool simcall_execution_test__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<bool>(simcall->result);
+ return simgrid::simix::unmarshal_raw<bool>(simcall->result_);
}
static inline void simcall_execution_test__set__result(smx_simcall_t simcall, bool result)
{
- simgrid::simix::marshal<bool>(simcall->result, result);
+ simgrid::simix::marshal<bool>(simcall->result_, result);
}
static inline smx_actor_t simcall_comm_send__get__sender(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_actor_t>(simcall->args_[0]);
}
static inline smx_actor_t simcall_comm_send__getraw__sender(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args_[0]);
}
static inline void simcall_comm_send__set__sender(smx_simcall_t simcall, smx_actor_t arg)
{
- simgrid::simix::marshal<smx_actor_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_actor_t>(simcall->args_[0], arg);
}
static inline smx_mailbox_t simcall_comm_send__get__mbox(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args_[1]);
}
static inline smx_mailbox_t simcall_comm_send__getraw__mbox(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_mailbox_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<smx_mailbox_t>(simcall->args_[1]);
}
static inline void simcall_comm_send__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg)
{
- simgrid::simix::marshal<smx_mailbox_t>(simcall->args[1], arg);
+ simgrid::simix::marshal<smx_mailbox_t>(simcall->args_[1], arg);
}
static inline double simcall_comm_send__get__task_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[2]);
}
static inline double simcall_comm_send__getraw__task_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[2]);
}
static inline void simcall_comm_send__set__task_size(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[2], arg);
+ simgrid::simix::marshal<double>(simcall->args_[2], arg);
}
static inline double simcall_comm_send__get__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[3]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[3]);
}
static inline double simcall_comm_send__getraw__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[3]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[3]);
}
static inline void simcall_comm_send__set__rate(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[3], arg);
+ simgrid::simix::marshal<double>(simcall->args_[3], arg);
}
static inline unsigned char* simcall_comm_send__get__src_buff(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<unsigned char*>(simcall->args[4]);
+ return simgrid::simix::unmarshal<unsigned char*>(simcall->args_[4]);
}
static inline unsigned char* simcall_comm_send__getraw__src_buff(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args[4]);
+ return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args_[4]);
}
static inline void simcall_comm_send__set__src_buff(smx_simcall_t simcall, unsigned char* arg)
{
- simgrid::simix::marshal<unsigned char*>(simcall->args[4], arg);
+ simgrid::simix::marshal<unsigned char*>(simcall->args_[4], arg);
}
static inline size_t simcall_comm_send__get__src_buff_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<size_t>(simcall->args[5]);
+ return simgrid::simix::unmarshal<size_t>(simcall->args_[5]);
}
static inline size_t simcall_comm_send__getraw__src_buff_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<size_t>(simcall->args[5]);
+ return simgrid::simix::unmarshal_raw<size_t>(simcall->args_[5]);
}
static inline void simcall_comm_send__set__src_buff_size(smx_simcall_t simcall, size_t arg)
{
- simgrid::simix::marshal<size_t>(simcall->args[5], arg);
+ simgrid::simix::marshal<size_t>(simcall->args_[5], arg);
}
static inline simix_match_func_t simcall_comm_send__get__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]);
+ return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args_[6]);
}
static inline simix_match_func_t simcall_comm_send__getraw__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args[6]);
+ return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args_[6]);
}
static inline void simcall_comm_send__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg)
{
- simgrid::simix::marshal<simix_match_func_t>(simcall->args[6], arg);
+ simgrid::simix::marshal<simix_match_func_t>(simcall->args_[6], arg);
}
static inline simix_copy_data_func_t simcall_comm_send__get__copy_data_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[7]);
+ return simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args_[7]);
}
static inline simix_copy_data_func_t simcall_comm_send__getraw__copy_data_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_copy_data_func_t>(simcall->args[7]);
+ return simgrid::simix::unmarshal_raw<simix_copy_data_func_t>(simcall->args_[7]);
}
static inline void simcall_comm_send__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg)
{
- simgrid::simix::marshal<simix_copy_data_func_t>(simcall->args[7], arg);
+ simgrid::simix::marshal<simix_copy_data_func_t>(simcall->args_[7], arg);
}
static inline void* simcall_comm_send__get__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<void*>(simcall->args[8]);
+ return simgrid::simix::unmarshal<void*>(simcall->args_[8]);
}
static inline void* simcall_comm_send__getraw__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<void*>(simcall->args[8]);
+ return simgrid::simix::unmarshal_raw<void*>(simcall->args_[8]);
}
static inline void simcall_comm_send__set__data(smx_simcall_t simcall, void* arg)
{
- simgrid::simix::marshal<void*>(simcall->args[8], arg);
+ simgrid::simix::marshal<void*>(simcall->args_[8], arg);
}
static inline double simcall_comm_send__get__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[9]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[9]);
}
static inline double simcall_comm_send__getraw__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[9]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[9]);
}
static inline void simcall_comm_send__set__timeout(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[9], arg);
+ simgrid::simix::marshal<double>(simcall->args_[9], arg);
}
static inline smx_actor_t simcall_comm_isend__get__sender(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_actor_t>(simcall->args_[0]);
}
static inline smx_actor_t simcall_comm_isend__getraw__sender(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args_[0]);
}
static inline void simcall_comm_isend__set__sender(smx_simcall_t simcall, smx_actor_t arg)
{
- simgrid::simix::marshal<smx_actor_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_actor_t>(simcall->args_[0], arg);
}
static inline smx_mailbox_t simcall_comm_isend__get__mbox(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args_[1]);
}
static inline smx_mailbox_t simcall_comm_isend__getraw__mbox(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_mailbox_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<smx_mailbox_t>(simcall->args_[1]);
}
static inline void simcall_comm_isend__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg)
{
- simgrid::simix::marshal<smx_mailbox_t>(simcall->args[1], arg);
+ simgrid::simix::marshal<smx_mailbox_t>(simcall->args_[1], arg);
}
static inline double simcall_comm_isend__get__task_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[2]);
}
static inline double simcall_comm_isend__getraw__task_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[2]);
}
static inline void simcall_comm_isend__set__task_size(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[2], arg);
+ simgrid::simix::marshal<double>(simcall->args_[2], arg);
}
static inline double simcall_comm_isend__get__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[3]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[3]);
}
static inline double simcall_comm_isend__getraw__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[3]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[3]);
}
static inline void simcall_comm_isend__set__rate(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[3], arg);
+ simgrid::simix::marshal<double>(simcall->args_[3], arg);
}
static inline unsigned char* simcall_comm_isend__get__src_buff(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<unsigned char*>(simcall->args[4]);
+ return simgrid::simix::unmarshal<unsigned char*>(simcall->args_[4]);
}
static inline unsigned char* simcall_comm_isend__getraw__src_buff(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args[4]);
+ return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args_[4]);
}
static inline void simcall_comm_isend__set__src_buff(smx_simcall_t simcall, unsigned char* arg)
{
- simgrid::simix::marshal<unsigned char*>(simcall->args[4], arg);
+ simgrid::simix::marshal<unsigned char*>(simcall->args_[4], arg);
}
static inline size_t simcall_comm_isend__get__src_buff_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<size_t>(simcall->args[5]);
+ return simgrid::simix::unmarshal<size_t>(simcall->args_[5]);
}
static inline size_t simcall_comm_isend__getraw__src_buff_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<size_t>(simcall->args[5]);
+ return simgrid::simix::unmarshal_raw<size_t>(simcall->args_[5]);
}
static inline void simcall_comm_isend__set__src_buff_size(smx_simcall_t simcall, size_t arg)
{
- simgrid::simix::marshal<size_t>(simcall->args[5], arg);
+ simgrid::simix::marshal<size_t>(simcall->args_[5], arg);
}
static inline simix_match_func_t simcall_comm_isend__get__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]);
+ return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args_[6]);
}
static inline simix_match_func_t simcall_comm_isend__getraw__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args[6]);
+ return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args_[6]);
}
static inline void simcall_comm_isend__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg)
{
- simgrid::simix::marshal<simix_match_func_t>(simcall->args[6], arg);
+ simgrid::simix::marshal<simix_match_func_t>(simcall->args_[6], arg);
}
static inline simix_clean_func_t simcall_comm_isend__get__clean_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_clean_func_t>(simcall->args[7]);
+ return simgrid::simix::unmarshal<simix_clean_func_t>(simcall->args_[7]);
}
static inline simix_clean_func_t simcall_comm_isend__getraw__clean_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_clean_func_t>(simcall->args[7]);
+ return simgrid::simix::unmarshal_raw<simix_clean_func_t>(simcall->args_[7]);
}
static inline void simcall_comm_isend__set__clean_fun(smx_simcall_t simcall, simix_clean_func_t arg)
{
- simgrid::simix::marshal<simix_clean_func_t>(simcall->args[7], arg);
+ simgrid::simix::marshal<simix_clean_func_t>(simcall->args_[7], arg);
}
static inline simix_copy_data_func_t simcall_comm_isend__get__copy_data_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[8]);
+ return simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args_[8]);
}
static inline simix_copy_data_func_t simcall_comm_isend__getraw__copy_data_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_copy_data_func_t>(simcall->args[8]);
+ return simgrid::simix::unmarshal_raw<simix_copy_data_func_t>(simcall->args_[8]);
}
static inline void simcall_comm_isend__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg)
{
- simgrid::simix::marshal<simix_copy_data_func_t>(simcall->args[8], arg);
+ simgrid::simix::marshal<simix_copy_data_func_t>(simcall->args_[8], arg);
}
static inline void* simcall_comm_isend__get__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<void*>(simcall->args[9]);
+ return simgrid::simix::unmarshal<void*>(simcall->args_[9]);
}
static inline void* simcall_comm_isend__getraw__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<void*>(simcall->args[9]);
+ return simgrid::simix::unmarshal_raw<void*>(simcall->args_[9]);
}
static inline void simcall_comm_isend__set__data(smx_simcall_t simcall, void* arg)
{
- simgrid::simix::marshal<void*>(simcall->args[9], arg);
+ simgrid::simix::marshal<void*>(simcall->args_[9], arg);
}
static inline bool simcall_comm_isend__get__detached(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<bool>(simcall->args[10]);
+ return simgrid::simix::unmarshal<bool>(simcall->args_[10]);
}
static inline bool simcall_comm_isend__getraw__detached(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<bool>(simcall->args[10]);
+ return simgrid::simix::unmarshal_raw<bool>(simcall->args_[10]);
}
static inline void simcall_comm_isend__set__detached(smx_simcall_t simcall, bool arg)
{
- simgrid::simix::marshal<bool>(simcall->args[10], arg);
+ simgrid::simix::marshal<bool>(simcall->args_[10], arg);
}
static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_comm_isend__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result);
+ return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result_);
}
static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_isend__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->result);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->result_);
}
static inline void simcall_comm_isend__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> result)
{
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, result);
+ simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result_, result);
}
static inline smx_actor_t simcall_comm_recv__get__receiver(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_actor_t>(simcall->args_[0]);
}
static inline smx_actor_t simcall_comm_recv__getraw__receiver(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args_[0]);
}
static inline void simcall_comm_recv__set__receiver(smx_simcall_t simcall, smx_actor_t arg)
{
- simgrid::simix::marshal<smx_actor_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_actor_t>(simcall->args_[0], arg);
}
static inline smx_mailbox_t simcall_comm_recv__get__mbox(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args_[1]);
}
static inline smx_mailbox_t simcall_comm_recv__getraw__mbox(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_mailbox_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<smx_mailbox_t>(simcall->args_[1]);
}
static inline void simcall_comm_recv__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg)
{
- simgrid::simix::marshal<smx_mailbox_t>(simcall->args[1], arg);
+ simgrid::simix::marshal<smx_mailbox_t>(simcall->args_[1], arg);
}
static inline unsigned char* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<unsigned char*>(simcall->args[2]);
+ return simgrid::simix::unmarshal<unsigned char*>(simcall->args_[2]);
}
static inline unsigned char* simcall_comm_recv__getraw__dst_buff(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args[2]);
+ return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args_[2]);
}
static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg)
{
- simgrid::simix::marshal<unsigned char*>(simcall->args[2], arg);
+ simgrid::simix::marshal<unsigned char*>(simcall->args_[2], arg);
}
static inline size_t* simcall_comm_recv__get__dst_buff_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<size_t*>(simcall->args[3]);
+ return simgrid::simix::unmarshal<size_t*>(simcall->args_[3]);
}
static inline size_t* simcall_comm_recv__getraw__dst_buff_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<size_t*>(simcall->args[3]);
+ return simgrid::simix::unmarshal_raw<size_t*>(simcall->args_[3]);
}
static inline void simcall_comm_recv__set__dst_buff_size(smx_simcall_t simcall, size_t* arg)
{
- simgrid::simix::marshal<size_t*>(simcall->args[3], arg);
+ simgrid::simix::marshal<size_t*>(simcall->args_[3], arg);
}
static inline simix_match_func_t simcall_comm_recv__get__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]);
+ return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args_[4]);
}
static inline simix_match_func_t simcall_comm_recv__getraw__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args[4]);
+ return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args_[4]);
}
static inline void simcall_comm_recv__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg)
{
- simgrid::simix::marshal<simix_match_func_t>(simcall->args[4], arg);
+ simgrid::simix::marshal<simix_match_func_t>(simcall->args_[4], arg);
}
static inline simix_copy_data_func_t simcall_comm_recv__get__copy_data_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]);
+ return simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args_[5]);
}
static inline simix_copy_data_func_t simcall_comm_recv__getraw__copy_data_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_copy_data_func_t>(simcall->args[5]);
+ return simgrid::simix::unmarshal_raw<simix_copy_data_func_t>(simcall->args_[5]);
}
static inline void simcall_comm_recv__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg)
{
- simgrid::simix::marshal<simix_copy_data_func_t>(simcall->args[5], arg);
+ simgrid::simix::marshal<simix_copy_data_func_t>(simcall->args_[5], arg);
}
static inline void* simcall_comm_recv__get__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<void*>(simcall->args[6]);
+ return simgrid::simix::unmarshal<void*>(simcall->args_[6]);
}
static inline void* simcall_comm_recv__getraw__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<void*>(simcall->args[6]);
+ return simgrid::simix::unmarshal_raw<void*>(simcall->args_[6]);
}
static inline void simcall_comm_recv__set__data(smx_simcall_t simcall, void* arg)
{
- simgrid::simix::marshal<void*>(simcall->args[6], arg);
+ simgrid::simix::marshal<void*>(simcall->args_[6], arg);
}
static inline double simcall_comm_recv__get__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[7]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[7]);
}
static inline double simcall_comm_recv__getraw__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[7]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[7]);
}
static inline void simcall_comm_recv__set__timeout(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[7], arg);
+ simgrid::simix::marshal<double>(simcall->args_[7], arg);
}
static inline double simcall_comm_recv__get__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[8]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[8]);
}
static inline double simcall_comm_recv__getraw__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[8]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[8]);
}
static inline void simcall_comm_recv__set__rate(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[8], arg);
+ simgrid::simix::marshal<double>(simcall->args_[8], arg);
}
static inline smx_actor_t simcall_comm_irecv__get__receiver(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_actor_t>(simcall->args_[0]);
}
static inline smx_actor_t simcall_comm_irecv__getraw__receiver(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args_[0]);
}
static inline void simcall_comm_irecv__set__receiver(smx_simcall_t simcall, smx_actor_t arg)
{
- simgrid::simix::marshal<smx_actor_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_actor_t>(simcall->args_[0], arg);
}
static inline smx_mailbox_t simcall_comm_irecv__get__mbox(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args_[1]);
}
static inline smx_mailbox_t simcall_comm_irecv__getraw__mbox(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_mailbox_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<smx_mailbox_t>(simcall->args_[1]);
}
static inline void simcall_comm_irecv__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg)
{
- simgrid::simix::marshal<smx_mailbox_t>(simcall->args[1], arg);
+ simgrid::simix::marshal<smx_mailbox_t>(simcall->args_[1], arg);
}
static inline unsigned char* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<unsigned char*>(simcall->args[2]);
+ return simgrid::simix::unmarshal<unsigned char*>(simcall->args_[2]);
}
static inline unsigned char* simcall_comm_irecv__getraw__dst_buff(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args[2]);
+ return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args_[2]);
}
static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg)
{
- simgrid::simix::marshal<unsigned char*>(simcall->args[2], arg);
+ simgrid::simix::marshal<unsigned char*>(simcall->args_[2], arg);
}
static inline size_t* simcall_comm_irecv__get__dst_buff_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<size_t*>(simcall->args[3]);
+ return simgrid::simix::unmarshal<size_t*>(simcall->args_[3]);
}
static inline size_t* simcall_comm_irecv__getraw__dst_buff_size(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<size_t*>(simcall->args[3]);
+ return simgrid::simix::unmarshal_raw<size_t*>(simcall->args_[3]);
}
static inline void simcall_comm_irecv__set__dst_buff_size(smx_simcall_t simcall, size_t* arg)
{
- simgrid::simix::marshal<size_t*>(simcall->args[3], arg);
+ simgrid::simix::marshal<size_t*>(simcall->args_[3], arg);
}
static inline simix_match_func_t simcall_comm_irecv__get__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]);
+ return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args_[4]);
}
static inline simix_match_func_t simcall_comm_irecv__getraw__match_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args[4]);
+ return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args_[4]);
}
static inline void simcall_comm_irecv__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg)
{
- simgrid::simix::marshal<simix_match_func_t>(simcall->args[4], arg);
+ simgrid::simix::marshal<simix_match_func_t>(simcall->args_[4], arg);
}
static inline simix_copy_data_func_t simcall_comm_irecv__get__copy_data_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]);
+ return simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args_[5]);
}
static inline simix_copy_data_func_t simcall_comm_irecv__getraw__copy_data_fun(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simix_copy_data_func_t>(simcall->args[5]);
+ return simgrid::simix::unmarshal_raw<simix_copy_data_func_t>(simcall->args_[5]);
}
static inline void simcall_comm_irecv__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg)
{
- simgrid::simix::marshal<simix_copy_data_func_t>(simcall->args[5], arg);
+ simgrid::simix::marshal<simix_copy_data_func_t>(simcall->args_[5], arg);
}
static inline void* simcall_comm_irecv__get__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<void*>(simcall->args[6]);
+ return simgrid::simix::unmarshal<void*>(simcall->args_[6]);
}
static inline void* simcall_comm_irecv__getraw__data(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<void*>(simcall->args[6]);
+ return simgrid::simix::unmarshal_raw<void*>(simcall->args_[6]);
}
static inline void simcall_comm_irecv__set__data(smx_simcall_t simcall, void* arg)
{
- simgrid::simix::marshal<void*>(simcall->args[6], arg);
+ simgrid::simix::marshal<void*>(simcall->args_[6], arg);
}
static inline double simcall_comm_irecv__get__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[7]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[7]);
}
static inline double simcall_comm_irecv__getraw__rate(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[7]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[7]);
}
static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[7], arg);
+ simgrid::simix::marshal<double>(simcall->args_[7], arg);
}
static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_comm_irecv__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result);
+ return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result_);
}
static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_irecv__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->result);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->result_);
}
static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> result)
{
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, result);
+ simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result_, result);
}
static inline simgrid::kernel::activity::CommImpl** simcall_comm_waitany__get__comms(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall->args[0]);
+ return simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall->args_[0]);
}
static inline simgrid::kernel::activity::CommImpl** simcall_comm_waitany__getraw__comms(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::CommImpl**>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::CommImpl**>(simcall->args_[0]);
}
static inline void simcall_comm_waitany__set__comms(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** arg)
{
- simgrid::simix::marshal<simgrid::kernel::activity::CommImpl**>(simcall->args[0], arg);
+ simgrid::simix::marshal<simgrid::kernel::activity::CommImpl**>(simcall->args_[0], arg);
}
static inline size_t simcall_comm_waitany__get__count(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<size_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal<size_t>(simcall->args_[1]);
}
static inline size_t simcall_comm_waitany__getraw__count(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<size_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<size_t>(simcall->args_[1]);
}
static inline void simcall_comm_waitany__set__count(smx_simcall_t simcall, size_t arg)
{
- simgrid::simix::marshal<size_t>(simcall->args[1], arg);
+ simgrid::simix::marshal<size_t>(simcall->args_[1], arg);
}
static inline double simcall_comm_waitany__get__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[2]);
}
static inline double simcall_comm_waitany__getraw__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[2]);
}
static inline void simcall_comm_waitany__set__timeout(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[2], arg);
+ simgrid::simix::marshal<double>(simcall->args_[2], arg);
}
static inline int simcall_comm_waitany__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->result);
+ return simgrid::simix::unmarshal<int>(simcall->result_);
}
static inline int simcall_comm_waitany__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->result);
+ return simgrid::simix::unmarshal_raw<int>(simcall->result_);
}
static inline void simcall_comm_waitany__set__result(smx_simcall_t simcall, int result)
{
- simgrid::simix::marshal<int>(simcall->result, result);
+ simgrid::simix::marshal<int>(simcall->result_, result);
}
static inline simgrid::kernel::activity::CommImpl* simcall_comm_wait__get__comm(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall->args_[0]);
}
static inline simgrid::kernel::activity::CommImpl* simcall_comm_wait__getraw__comm(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::CommImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::CommImpl*>(simcall->args_[0]);
}
static inline void simcall_comm_wait__set__comm(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* arg)
{
- simgrid::simix::marshal<simgrid::kernel::activity::CommImpl*>(simcall->args[0], arg);
+ simgrid::simix::marshal<simgrid::kernel::activity::CommImpl*>(simcall->args_[0], arg);
}
static inline double simcall_comm_wait__get__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[1]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[1]);
}
static inline double simcall_comm_wait__getraw__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[1]);
}
static inline void simcall_comm_wait__set__timeout(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[1], arg);
+ simgrid::simix::marshal<double>(simcall->args_[1], arg);
}
static inline simgrid::kernel::activity::CommImpl* simcall_comm_test__get__comm(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall->args_[0]);
}
static inline simgrid::kernel::activity::CommImpl* simcall_comm_test__getraw__comm(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::CommImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::CommImpl*>(simcall->args_[0]);
}
static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* arg)
{
- simgrid::simix::marshal<simgrid::kernel::activity::CommImpl*>(simcall->args[0], arg);
+ simgrid::simix::marshal<simgrid::kernel::activity::CommImpl*>(simcall->args_[0], arg);
}
static inline bool simcall_comm_test__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<bool>(simcall->result);
+ return simgrid::simix::unmarshal<bool>(simcall->result_);
}
static inline bool simcall_comm_test__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<bool>(simcall->result);
+ return simgrid::simix::unmarshal_raw<bool>(simcall->result_);
}
static inline void simcall_comm_test__set__result(smx_simcall_t simcall, bool result)
{
- simgrid::simix::marshal<bool>(simcall->result, result);
+ simgrid::simix::marshal<bool>(simcall->result_, result);
}
static inline simgrid::kernel::activity::CommImpl** simcall_comm_testany__get__comms(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall->args[0]);
+ return simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall->args_[0]);
}
static inline simgrid::kernel::activity::CommImpl** simcall_comm_testany__getraw__comms(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::CommImpl**>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::CommImpl**>(simcall->args_[0]);
}
static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** arg)
{
- simgrid::simix::marshal<simgrid::kernel::activity::CommImpl**>(simcall->args[0], arg);
+ simgrid::simix::marshal<simgrid::kernel::activity::CommImpl**>(simcall->args_[0], arg);
}
static inline size_t simcall_comm_testany__get__count(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<size_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal<size_t>(simcall->args_[1]);
}
static inline size_t simcall_comm_testany__getraw__count(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<size_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<size_t>(simcall->args_[1]);
}
static inline void simcall_comm_testany__set__count(smx_simcall_t simcall, size_t arg)
{
- simgrid::simix::marshal<size_t>(simcall->args[1], arg);
+ simgrid::simix::marshal<size_t>(simcall->args_[1], arg);
}
static inline int simcall_comm_testany__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->result);
+ return simgrid::simix::unmarshal<int>(simcall->result_);
}
static inline int simcall_comm_testany__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->result);
+ return simgrid::simix::unmarshal_raw<int>(simcall->result_);
}
static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result)
{
- simgrid::simix::marshal<int>(simcall->result, result);
+ simgrid::simix::marshal<int>(simcall->result_, result);
}
static inline smx_mutex_t simcall_mutex_lock__get__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args_[0]);
}
static inline smx_mutex_t simcall_mutex_lock__getraw__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args_[0]);
}
static inline void simcall_mutex_lock__set__mutex(smx_simcall_t simcall, smx_mutex_t arg)
{
- simgrid::simix::marshal<smx_mutex_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_mutex_t>(simcall->args_[0], arg);
}
static inline smx_mutex_t simcall_mutex_trylock__get__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args_[0]);
}
static inline smx_mutex_t simcall_mutex_trylock__getraw__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args_[0]);
}
static inline void simcall_mutex_trylock__set__mutex(smx_simcall_t simcall, smx_mutex_t arg)
{
- simgrid::simix::marshal<smx_mutex_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_mutex_t>(simcall->args_[0], arg);
}
static inline int simcall_mutex_trylock__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->result);
+ return simgrid::simix::unmarshal<int>(simcall->result_);
}
static inline int simcall_mutex_trylock__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->result);
+ return simgrid::simix::unmarshal_raw<int>(simcall->result_);
}
static inline void simcall_mutex_trylock__set__result(smx_simcall_t simcall, int result)
{
- simgrid::simix::marshal<int>(simcall->result, result);
+ simgrid::simix::marshal<int>(simcall->result_, result);
}
static inline smx_mutex_t simcall_mutex_unlock__get__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args_[0]);
}
static inline smx_mutex_t simcall_mutex_unlock__getraw__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args_[0]);
}
static inline void simcall_mutex_unlock__set__mutex(smx_simcall_t simcall, smx_mutex_t arg)
{
- simgrid::simix::marshal<smx_mutex_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_mutex_t>(simcall->args_[0], arg);
}
static inline smx_cond_t simcall_cond_wait__get__cond(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_cond_t>(simcall->args_[0]);
}
static inline smx_cond_t simcall_cond_wait__getraw__cond(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_cond_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_cond_t>(simcall->args_[0]);
}
static inline void simcall_cond_wait__set__cond(smx_simcall_t simcall, smx_cond_t arg)
{
- simgrid::simix::marshal<smx_cond_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_cond_t>(simcall->args_[0], arg);
}
static inline smx_mutex_t simcall_cond_wait__get__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args_[1]);
}
static inline smx_mutex_t simcall_cond_wait__getraw__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args_[1]);
}
static inline void simcall_cond_wait__set__mutex(smx_simcall_t simcall, smx_mutex_t arg)
{
- simgrid::simix::marshal<smx_mutex_t>(simcall->args[1], arg);
+ simgrid::simix::marshal<smx_mutex_t>(simcall->args_[1], arg);
}
static inline smx_cond_t simcall_cond_wait_timeout__get__cond(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_cond_t>(simcall->args_[0]);
}
static inline smx_cond_t simcall_cond_wait_timeout__getraw__cond(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_cond_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_cond_t>(simcall->args_[0]);
}
static inline void simcall_cond_wait_timeout__set__cond(smx_simcall_t simcall, smx_cond_t arg)
{
- simgrid::simix::marshal<smx_cond_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_cond_t>(simcall->args_[0], arg);
}
static inline smx_mutex_t simcall_cond_wait_timeout__get__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal<smx_mutex_t>(simcall->args_[1]);
}
static inline smx_mutex_t simcall_cond_wait_timeout__getraw__mutex(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<smx_mutex_t>(simcall->args_[1]);
}
static inline void simcall_cond_wait_timeout__set__mutex(smx_simcall_t simcall, smx_mutex_t arg)
{
- simgrid::simix::marshal<smx_mutex_t>(simcall->args[1], arg);
+ simgrid::simix::marshal<smx_mutex_t>(simcall->args_[1], arg);
}
static inline double simcall_cond_wait_timeout__get__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[2]);
}
static inline double simcall_cond_wait_timeout__getraw__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[2]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[2]);
}
static inline void simcall_cond_wait_timeout__set__timeout(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[2], arg);
+ simgrid::simix::marshal<double>(simcall->args_[2], arg);
}
static inline int simcall_cond_wait_timeout__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->result);
+ return simgrid::simix::unmarshal<int>(simcall->result_);
}
static inline int simcall_cond_wait_timeout__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->result);
+ return simgrid::simix::unmarshal_raw<int>(simcall->result_);
}
static inline void simcall_cond_wait_timeout__set__result(smx_simcall_t simcall, int result)
{
- simgrid::simix::marshal<int>(simcall->result, result);
+ simgrid::simix::marshal<int>(simcall->result_, result);
}
static inline smx_sem_t simcall_sem_acquire__get__sem(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_sem_t>(simcall->args_[0]);
}
static inline smx_sem_t simcall_sem_acquire__getraw__sem(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_sem_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_sem_t>(simcall->args_[0]);
}
static inline void simcall_sem_acquire__set__sem(smx_simcall_t simcall, smx_sem_t arg)
{
- simgrid::simix::marshal<smx_sem_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_sem_t>(simcall->args_[0], arg);
}
static inline smx_sem_t simcall_sem_acquire_timeout__get__sem(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal<smx_sem_t>(simcall->args_[0]);
}
static inline smx_sem_t simcall_sem_acquire_timeout__getraw__sem(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<smx_sem_t>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<smx_sem_t>(simcall->args_[0]);
}
static inline void simcall_sem_acquire_timeout__set__sem(smx_simcall_t simcall, smx_sem_t arg)
{
- simgrid::simix::marshal<smx_sem_t>(simcall->args[0], arg);
+ simgrid::simix::marshal<smx_sem_t>(simcall->args_[0], arg);
}
static inline double simcall_sem_acquire_timeout__get__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<double>(simcall->args[1]);
+ return simgrid::simix::unmarshal<double>(simcall->args_[1]);
}
static inline double simcall_sem_acquire_timeout__getraw__timeout(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<double>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<double>(simcall->args_[1]);
}
static inline void simcall_sem_acquire_timeout__set__timeout(smx_simcall_t simcall, double arg)
{
- simgrid::simix::marshal<double>(simcall->args[1], arg);
+ simgrid::simix::marshal<double>(simcall->args_[1], arg);
}
static inline int simcall_sem_acquire_timeout__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->result);
+ return simgrid::simix::unmarshal<int>(simcall->result_);
}
static inline int simcall_sem_acquire_timeout__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->result);
+ return simgrid::simix::unmarshal_raw<int>(simcall->result_);
}
static inline void simcall_sem_acquire_timeout__set__result(smx_simcall_t simcall, int result)
{
- simgrid::simix::marshal<int>(simcall->result, result);
+ simgrid::simix::marshal<int>(simcall->result_, result);
}
static inline simgrid::kernel::activity::IoImpl* simcall_io_wait__get__io(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<simgrid::kernel::activity::IoImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal<simgrid::kernel::activity::IoImpl*>(simcall->args_[0]);
}
static inline simgrid::kernel::activity::IoImpl* simcall_io_wait__getraw__io(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::IoImpl*>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::IoImpl*>(simcall->args_[0]);
}
static inline void simcall_io_wait__set__io(smx_simcall_t simcall, simgrid::kernel::activity::IoImpl* arg)
{
- simgrid::simix::marshal<simgrid::kernel::activity::IoImpl*>(simcall->args[0], arg);
+ simgrid::simix::marshal<simgrid::kernel::activity::IoImpl*>(simcall->args_[0], arg);
}
static inline sg_size_t simcall_io_wait__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<sg_size_t>(simcall->result);
+ return simgrid::simix::unmarshal<sg_size_t>(simcall->result_);
}
static inline sg_size_t simcall_io_wait__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<sg_size_t>(simcall->result);
+ return simgrid::simix::unmarshal_raw<sg_size_t>(simcall->result_);
}
static inline void simcall_io_wait__set__result(smx_simcall_t simcall, sg_size_t result)
{
- simgrid::simix::marshal<sg_size_t>(simcall->result, result);
+ simgrid::simix::marshal<sg_size_t>(simcall->result_, result);
}
static inline int simcall_mc_random__get__min(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->args[0]);
+ return simgrid::simix::unmarshal<int>(simcall->args_[0]);
}
static inline int simcall_mc_random__getraw__min(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<int>(simcall->args_[0]);
}
static inline void simcall_mc_random__set__min(smx_simcall_t simcall, int arg)
{
- simgrid::simix::marshal<int>(simcall->args[0], arg);
+ simgrid::simix::marshal<int>(simcall->args_[0], arg);
}
static inline int simcall_mc_random__get__max(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->args[1]);
+ return simgrid::simix::unmarshal<int>(simcall->args_[1]);
}
static inline int simcall_mc_random__getraw__max(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->args[1]);
+ return simgrid::simix::unmarshal_raw<int>(simcall->args_[1]);
}
static inline void simcall_mc_random__set__max(smx_simcall_t simcall, int arg)
{
- simgrid::simix::marshal<int>(simcall->args[1], arg);
+ simgrid::simix::marshal<int>(simcall->args_[1], arg);
}
static inline int simcall_mc_random__get__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<int>(simcall->result);
+ return simgrid::simix::unmarshal<int>(simcall->result_);
}
static inline int simcall_mc_random__getraw__result(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<int>(simcall->result);
+ return simgrid::simix::unmarshal_raw<int>(simcall->result_);
}
static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int result)
{
- simgrid::simix::marshal<int>(simcall->result, result);
+ simgrid::simix::marshal<int>(simcall->result_, result);
}
static inline std::function<void()> const* simcall_run_kernel__get__code(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]);
+ return simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args_[0]);
}
static inline std::function<void()> const* simcall_run_kernel__getraw__code(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<std::function<void()> const*>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<std::function<void()> const*>(simcall->args_[0]);
}
static inline void simcall_run_kernel__set__code(smx_simcall_t simcall, std::function<void()> const* arg)
{
- simgrid::simix::marshal<std::function<void()> const*>(simcall->args[0], arg);
+ simgrid::simix::marshal<std::function<void()> const*>(simcall->args_[0], arg);
}
static inline std::function<void()> const* simcall_run_blocking__get__code(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]);
+ return simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args_[0]);
}
static inline std::function<void()> const* simcall_run_blocking__getraw__code(smx_simcall_t simcall)
{
- return simgrid::simix::unmarshal_raw<std::function<void()> const*>(simcall->args[0]);
+ return simgrid::simix::unmarshal_raw<std::function<void()> const*>(simcall->args_[0]);
}
static inline void simcall_run_blocking__set__code(smx_simcall_t simcall, std::function<void()> const* arg)
{
- simgrid::simix::marshal<std::function<void()> const*>(simcall->args[0], arg);
+ simgrid::simix::marshal<std::function<void()> const*>(simcall->args_[0], arg);
}
/* The prototype of all simcall handlers, automatically generated for you */
smx_actor_t self = SIMIX_process_self();
simgrid::simix::marshal(&self->simcall, call, t...);
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->get_cname(), SIMIX_simcall_name(self->simcall.call),
- (int)self->simcall.call);
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->get_cname(), SIMIX_simcall_name(self->simcall.call_),
+ (int)self->simcall.call_);
self->yield();
} else {
self->simcall_handle(0);
}
- return simgrid::simix::unmarshal<R>(self->simcall.result);
+ return simgrid::simix::unmarshal<R>(self->simcall.result_);
}
inline static int simcall_BODY_execution_wait(simgrid::kernel::activity::ExecImpl* execution)
* This function is generated from src/simix/simcalls.in
*/
void simgrid::kernel::actor::ActorImpl::simcall_handle(int value) {
- XBT_DEBUG("Handling simcall %p: %s", &simcall, SIMIX_simcall_name(simcall.call));
+ XBT_DEBUG("Handling simcall %p: %s", &simcall, SIMIX_simcall_name(simcall.call_));
SIMCALL_SET_MC_VALUE(simcall, value);
if (context_->iwannadie)
return;
- switch (simcall.call) {
+ switch (simcall.call_) {
case SIMCALL_EXECUTION_WAIT:
- simcall_HANDLER_execution_wait(&simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall.args[0]));
+ simcall_HANDLER_execution_wait(&simcall,
+ simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall.args_[0]));
break;
case SIMCALL_EXECUTION_WAITANY_FOR:
- simcall_HANDLER_execution_waitany_for(&simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl**>(simcall.args[0]), simgrid::simix::unmarshal<size_t>(simcall.args[1]), simgrid::simix::unmarshal<double>(simcall.args[2]));
+ simcall_HANDLER_execution_waitany_for(
+ &simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl**>(simcall.args_[0]),
+ simgrid::simix::unmarshal<size_t>(simcall.args_[1]), simgrid::simix::unmarshal<double>(simcall.args_[2]));
break;
case SIMCALL_EXECUTION_TEST:
- simcall_HANDLER_execution_test(&simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall.args[0]));
+ simcall_HANDLER_execution_test(&simcall,
+ simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall.args_[0]));
break;
case SIMCALL_COMM_SEND:
- simcall_HANDLER_comm_send(&simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall.args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall.args[1]), simgrid::simix::unmarshal<double>(simcall.args[2]), simgrid::simix::unmarshal<double>(simcall.args[3]), simgrid::simix::unmarshal<unsigned char*>(simcall.args[4]), simgrid::simix::unmarshal<size_t>(simcall.args[5]), simgrid::simix::unmarshal<simix_match_func_t>(simcall.args[6]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall.args[7]), simgrid::simix::unmarshal<void*>(simcall.args[8]), simgrid::simix::unmarshal<double>(simcall.args[9]));
+ simcall_HANDLER_comm_send(
+ &simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall.args_[0]),
+ simgrid::simix::unmarshal<smx_mailbox_t>(simcall.args_[1]),
+ simgrid::simix::unmarshal<double>(simcall.args_[2]), simgrid::simix::unmarshal<double>(simcall.args_[3]),
+ simgrid::simix::unmarshal<unsigned char*>(simcall.args_[4]),
+ simgrid::simix::unmarshal<size_t>(simcall.args_[5]),
+ simgrid::simix::unmarshal<simix_match_func_t>(simcall.args_[6]),
+ simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall.args_[7]),
+ simgrid::simix::unmarshal<void*>(simcall.args_[8]), simgrid::simix::unmarshal<double>(simcall.args_[9]));
break;
case SIMCALL_COMM_ISEND:
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall.result, simcall_HANDLER_comm_isend(&simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall.args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall.args[1]), simgrid::simix::unmarshal<double>(simcall.args[2]), simgrid::simix::unmarshal<double>(simcall.args[3]), simgrid::simix::unmarshal<unsigned char*>(simcall.args[4]), simgrid::simix::unmarshal<size_t>(simcall.args[5]), simgrid::simix::unmarshal<simix_match_func_t>(simcall.args[6]), simgrid::simix::unmarshal<simix_clean_func_t>(simcall.args[7]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall.args[8]), simgrid::simix::unmarshal<void*>(simcall.args[9]), simgrid::simix::unmarshal<bool>(simcall.args[10])));
+ simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(
+ simcall.result_,
+ simcall_HANDLER_comm_isend(
+ &simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall.args_[0]),
+ simgrid::simix::unmarshal<smx_mailbox_t>(simcall.args_[1]),
+ simgrid::simix::unmarshal<double>(simcall.args_[2]), simgrid::simix::unmarshal<double>(simcall.args_[3]),
+ simgrid::simix::unmarshal<unsigned char*>(simcall.args_[4]),
+ simgrid::simix::unmarshal<size_t>(simcall.args_[5]),
+ simgrid::simix::unmarshal<simix_match_func_t>(simcall.args_[6]),
+ simgrid::simix::unmarshal<simix_clean_func_t>(simcall.args_[7]),
+ simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall.args_[8]),
+ simgrid::simix::unmarshal<void*>(simcall.args_[9]), simgrid::simix::unmarshal<bool>(simcall.args_[10])));
simcall_answer();
break;
case SIMCALL_COMM_RECV:
- simcall_HANDLER_comm_recv(&simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall.args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall.args[1]), simgrid::simix::unmarshal<unsigned char*>(simcall.args[2]), simgrid::simix::unmarshal<size_t*>(simcall.args[3]), simgrid::simix::unmarshal<simix_match_func_t>(simcall.args[4]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall.args[5]), simgrid::simix::unmarshal<void*>(simcall.args[6]), simgrid::simix::unmarshal<double>(simcall.args[7]), simgrid::simix::unmarshal<double>(simcall.args[8]));
+ simcall_HANDLER_comm_recv(&simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall.args_[0]),
+ simgrid::simix::unmarshal<smx_mailbox_t>(simcall.args_[1]),
+ simgrid::simix::unmarshal<unsigned char*>(simcall.args_[2]),
+ simgrid::simix::unmarshal<size_t*>(simcall.args_[3]),
+ simgrid::simix::unmarshal<simix_match_func_t>(simcall.args_[4]),
+ simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall.args_[5]),
+ simgrid::simix::unmarshal<void*>(simcall.args_[6]),
+ simgrid::simix::unmarshal<double>(simcall.args_[7]),
+ simgrid::simix::unmarshal<double>(simcall.args_[8]));
break;
case SIMCALL_COMM_IRECV:
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall.result, simcall_HANDLER_comm_irecv(&simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall.args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall.args[1]), simgrid::simix::unmarshal<unsigned char*>(simcall.args[2]), simgrid::simix::unmarshal<size_t*>(simcall.args[3]), simgrid::simix::unmarshal<simix_match_func_t>(simcall.args[4]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall.args[5]), simgrid::simix::unmarshal<void*>(simcall.args[6]), simgrid::simix::unmarshal<double>(simcall.args[7])));
+ simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(
+ simcall.result_,
+ simcall_HANDLER_comm_irecv(&simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall.args_[0]),
+ simgrid::simix::unmarshal<smx_mailbox_t>(simcall.args_[1]),
+ simgrid::simix::unmarshal<unsigned char*>(simcall.args_[2]),
+ simgrid::simix::unmarshal<size_t*>(simcall.args_[3]),
+ simgrid::simix::unmarshal<simix_match_func_t>(simcall.args_[4]),
+ simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall.args_[5]),
+ simgrid::simix::unmarshal<void*>(simcall.args_[6]),
+ simgrid::simix::unmarshal<double>(simcall.args_[7])));
simcall_answer();
break;
case SIMCALL_COMM_WAITANY:
- simcall_HANDLER_comm_waitany(&simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall.args[0]), simgrid::simix::unmarshal<size_t>(simcall.args[1]), simgrid::simix::unmarshal<double>(simcall.args[2]));
+ simcall_HANDLER_comm_waitany(
+ &simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall.args_[0]),
+ simgrid::simix::unmarshal<size_t>(simcall.args_[1]), simgrid::simix::unmarshal<double>(simcall.args_[2]));
break;
case SIMCALL_COMM_WAIT:
- simcall_HANDLER_comm_wait(&simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall.args[0]), simgrid::simix::unmarshal<double>(simcall.args[1]));
+ simcall_HANDLER_comm_wait(&simcall,
+ simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall.args_[0]),
+ simgrid::simix::unmarshal<double>(simcall.args_[1]));
break;
case SIMCALL_COMM_TEST:
- simcall_HANDLER_comm_test(&simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall.args[0]));
+ simcall_HANDLER_comm_test(&simcall,
+ simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall.args_[0]));
break;
case SIMCALL_COMM_TESTANY:
- simcall_HANDLER_comm_testany(&simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall.args[0]), simgrid::simix::unmarshal<size_t>(simcall.args[1]));
+ simcall_HANDLER_comm_testany(&simcall,
+ simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall.args_[0]),
+ simgrid::simix::unmarshal<size_t>(simcall.args_[1]));
break;
case SIMCALL_MUTEX_LOCK:
- simcall_HANDLER_mutex_lock(&simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall.args[0]));
+ simcall_HANDLER_mutex_lock(&simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall.args_[0]));
break;
case SIMCALL_MUTEX_TRYLOCK:
- simgrid::simix::marshal<int>(simcall.result, simcall_HANDLER_mutex_trylock(&simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall.args[0])));
+ simgrid::simix::marshal<int>(
+ simcall.result_,
+ simcall_HANDLER_mutex_trylock(&simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall.args_[0])));
simcall_answer();
break;
case SIMCALL_MUTEX_UNLOCK:
- simcall_HANDLER_mutex_unlock(&simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall.args[0]));
+ simcall_HANDLER_mutex_unlock(&simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall.args_[0]));
simcall_answer();
break;
case SIMCALL_COND_WAIT:
- simcall_HANDLER_cond_wait(&simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall.args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall.args[1]));
+ simcall_HANDLER_cond_wait(&simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall.args_[0]),
+ simgrid::simix::unmarshal<smx_mutex_t>(simcall.args_[1]));
break;
case SIMCALL_COND_WAIT_TIMEOUT:
- simcall_HANDLER_cond_wait_timeout(&simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall.args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall.args[1]), simgrid::simix::unmarshal<double>(simcall.args[2]));
+ simcall_HANDLER_cond_wait_timeout(&simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall.args_[0]),
+ simgrid::simix::unmarshal<smx_mutex_t>(simcall.args_[1]),
+ simgrid::simix::unmarshal<double>(simcall.args_[2]));
break;
case SIMCALL_SEM_ACQUIRE:
- simcall_HANDLER_sem_acquire(&simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall.args[0]));
+ simcall_HANDLER_sem_acquire(&simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall.args_[0]));
break;
case SIMCALL_SEM_ACQUIRE_TIMEOUT:
- simcall_HANDLER_sem_acquire_timeout(&simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall.args[0]), simgrid::simix::unmarshal<double>(simcall.args[1]));
+ simcall_HANDLER_sem_acquire_timeout(&simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall.args_[0]),
+ simgrid::simix::unmarshal<double>(simcall.args_[1]));
break;
case SIMCALL_IO_WAIT:
- simcall_HANDLER_io_wait(&simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::IoImpl*>(simcall.args[0]));
+ simcall_HANDLER_io_wait(&simcall,
+ simgrid::simix::unmarshal<simgrid::kernel::activity::IoImpl*>(simcall.args_[0]));
break;
case SIMCALL_MC_RANDOM:
- simgrid::simix::marshal<int>(simcall.result, simcall_HANDLER_mc_random(&simcall, simgrid::simix::unmarshal<int>(simcall.args[0]), simgrid::simix::unmarshal<int>(simcall.args[1])));
+ simgrid::simix::marshal<int>(simcall.result_,
+ simcall_HANDLER_mc_random(&simcall, simgrid::simix::unmarshal<int>(simcall.args_[0]),
+ simgrid::simix::unmarshal<int>(simcall.args_[1])));
simcall_answer();
break;
case SIMCALL_RUN_KERNEL:
- SIMIX_run_kernel(simgrid::simix::unmarshal<std::function<void()> const*>(simcall.args[0]));
+ SIMIX_run_kernel(simgrid::simix::unmarshal<std::function<void()> const*>(simcall.args_[0]));
simcall_answer();
break;
case SIMCALL_RUN_BLOCKING:
- SIMIX_run_blocking(simgrid::simix::unmarshal<std::function<void()> const*>(simcall.args[0]));
+ SIMIX_run_blocking(simgrid::simix::unmarshal<std::function<void()> const*>(simcall.args_[0]));
break;
case NUM_SIMCALLS:
* @brief Represents a simcall to the kernel.
*/
struct s_smx_simcall {
- e_smx_simcall_t call;
- smx_actor_t issuer;
- smx_timer_t timeout_cb; // Callback to timeouts
- simgrid::kernel::actor::Transition* transition = nullptr;
- int mc_value;
- u_smx_scalar args[11];
- u_smx_scalar result;
+ e_smx_simcall_t call_;
+ smx_actor_t issuer_;
+ smx_timer_t timeout_cb_; // Callback to timeouts
+ simgrid::kernel::actor::Transition* transition_ = nullptr;
+ int mc_value_;
+ u_smx_scalar args_[11];
+ u_smx_scalar result_;
};
-#define SIMCALL_SET_MC_VALUE(simcall, value) ((simcall).mc_value = (value))
-#define SIMCALL_GET_MC_VALUE(simcall) ((simcall).mc_value)
+#define SIMCALL_SET_MC_VALUE(simcall, value) ((simcall).mc_value_ = (value))
+#define SIMCALL_GET_MC_VALUE(simcall) ((simcall).mc_value_)
/******************************** General *************************************/
template <std::size_t I, class A> inline void marshal_args(smx_simcall_t simcall, A const& a)
{
- marshal(simcall->args[I], a);
+ marshal(simcall->args_[I], a);
}
template <std::size_t I, class A, class... B> inline void marshal_args(smx_simcall_t simcall, A const& a, B const&... b)
{
- marshal(simcall->args[I], a);
+ marshal(simcall->args_[I], a);
marshal_args<I + 1>(simcall, b...);
}
/** Initialize the simcall */
template <class... A> inline void marshal(smx_simcall_t simcall, e_smx_simcall_t call, A const&... a)
{
- simcall->call = call;
- memset(&simcall->result, 0, sizeof(simcall->result));
- memset(simcall->args, 0, sizeof(simcall->args));
+ simcall->call_ = call;
+ memset(&simcall->result_, 0, sizeof(simcall->result_));
+ memset(simcall->args_, 0, sizeof(simcall->args_));
marshal_args<0>(simcall, a...);
}
}
*/
for (smx_actor_t const& process : simix_global->actors_that_ran) {
- if (process->simcall.call != SIMCALL_NONE) {
+ if (process->simcall.call_ != SIMCALL_NONE) {
process->simcall_handle(0);
}
}
if (!done) {
done = true;
simgrid::kernel::activity::ExecImpl::on_completion.connect([](simgrid::kernel::activity::ExecImpl const& activity) {
- simgrid::smpi::plugin::lb.record_actor_computation(activity.simcalls_.front()->issuer->iface(),
+ simgrid::smpi::plugin::lb.record_actor_computation(activity.simcalls_.front()->issuer_->iface(),
activity.surf_action_->get_cost());
});