public:
ActivityImpl();
virtual ~ActivityImpl();
- e_smx_state_t state = SIMIX_WAITING; /* State of the activity */
- std::string name; /* Activity name if any */
- std::list<smx_simcall_t> simcalls; /* List of simcalls waiting for this activity */
+ e_smx_state_t state_ = SIMIX_WAITING; /* State of the activity */
+ std::string name_; /* Activity name if any */
+ std::list<smx_simcall_t> simcalls_; /* List of simcalls waiting for this activity */
virtual void suspend() = 0;
virtual void resume() = 0;
simgrid::kernel::activity::CommImpl::CommImpl(e_smx_comm_type_t _type) : type(_type)
{
- state = SIMIX_WAITING;
+ state_ = SIMIX_WAITING;
src_data = nullptr;
dst_data = nullptr;
XBT_DEBUG("Create comm activity %p", this);
cleanupSurf();
- if (detached && state != SIMIX_DONE) {
+ if (detached && state_ != SIMIX_DONE) {
/* the communication has failed and was detached:
* we have to free the buffer */
if (clean_fun)
{
/* if the synchro is a waiting state means that it is still in a mbox */
/* so remove from it and delete it */
- if (state == SIMIX_WAITING) {
+ if (state_ == SIMIX_WAITING) {
mbox->remove(this);
- state = SIMIX_CANCELED;
+ state_ = SIMIX_CANCELED;
} else if (not MC_is_active() /* when running the MC there are no surf actions */
- && not MC_record_replay_is_active() && (state == SIMIX_READY || state == SIMIX_RUNNING)) {
+ && not MC_record_replay_is_active() && (state_ == SIMIX_READY || state_ == SIMIX_RUNNING)) {
surfAction_->cancel();
}
{
/* Update synchro state */
if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::done)
- state = SIMIX_SRC_TIMEOUT;
+ state_ = SIMIX_SRC_TIMEOUT;
else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::done)
- state = SIMIX_DST_TIMEOUT;
+ state_ = SIMIX_DST_TIMEOUT;
else if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::failed)
- state = SIMIX_SRC_HOST_FAILURE;
+ state_ = SIMIX_SRC_HOST_FAILURE;
else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::failed)
- state = SIMIX_DST_HOST_FAILURE;
+ state_ = SIMIX_DST_HOST_FAILURE;
else if (surfAction_ && surfAction_->get_state() == simgrid::kernel::resource::Action::State::failed) {
- state = SIMIX_LINK_FAILURE;
+ state_ = SIMIX_LINK_FAILURE;
} else
- state = SIMIX_DONE;
+ state_ = SIMIX_DONE;
- XBT_DEBUG("SIMIX_post_comm: comm %p, state %d, src_proc %p, dst_proc %p, detached: %d", this, (int)state, src_proc,
+ XBT_DEBUG("SIMIX_post_comm: comm %p, state %d, src_proc %p, dst_proc %p, detached: %d", this, (int)state_, src_proc,
dst_proc, detached);
/* destroy the surf actions associated with the Simix communication */
cleanupSurf();
/* if there are simcalls associated with the synchro, then answer them */
- if (not simcalls.empty()) {
+ if (not simcalls_.empty()) {
SIMIX_comm_finish(this);
}
}
}
synchro = SIMIX_synchro_wait(issuer->host, timeout);
- synchro->simcalls.push_front(simcall);
+ synchro->simcalls_.push_front(simcall);
issuer->waiting_synchro = synchro;
cond->sleeping.push_back(*simcall->issuer);
XBT_OUT();
: host_(host)
{
if (name)
- this->name = name;
- this->state = SIMIX_RUNNING;
+ this->name_ = name;
+ this->state_ = SIMIX_RUNNING;
surf_action_ = surf_action;
surf_action_->set_data(this);
double simgrid::kernel::activity::ExecImpl::get_remaining_ratio()
{
- if (host_ == nullptr) // parallel task: their remain is already between 0 and 1 (see comment in ExecImpl::remains())
+ if (host_ ==
+ nullptr) // parallel task: their remain is already between 0 and 1 (see comment in ExecImpl::get_remaining())
return surf_action_->get_remains();
else // Actually compute the ratio for sequential tasks
return surf_action_->get_remains() / surf_action_->get_cost();
if (host_ && host_->isOff()) { /* FIXME: handle resource failure for parallel tasks too */
/* If the host running the synchro failed, notice it. This way, the asking
* process can be killed if it runs on that host itself */
- state = SIMIX_FAILED;
+ state_ = SIMIX_FAILED;
} else if (surf_action_ && surf_action_->get_state() == simgrid::kernel::resource::Action::State::failed) {
/* If the host running the synchro didn't fail, then the synchro was canceled */
- state = SIMIX_CANCELED;
+ state_ = SIMIX_CANCELED;
} else if (timeout_detector_ && timeout_detector_->get_state() == simgrid::kernel::resource::Action::State::done) {
- state = SIMIX_TIMEOUT;
+ state_ = SIMIX_TIMEOUT;
} else {
- state = SIMIX_DONE;
+ state_ = SIMIX_DONE;
}
if (surf_action_) {
onCompletion(this);
/* If there are simcalls associated with the synchro, then answer them */
- if (not simcalls.empty())
+ if (not simcalls_.empty())
SIMIX_execution_finish(this);
}
/* FIXME: check if the host is active ? */
/* Somebody using the mutex, use a synchronization to get host failures */
synchro = SIMIX_synchro_wait(issuer->host, -1);
- synchro->simcalls.push_back(&issuer->simcall);
+ synchro->simcalls_.push_back(&issuer->simcall);
issuer->waiting_synchro = synchro;
this->sleeping.push_back(*issuer);
} else {
void simgrid::kernel::activity::SleepImpl::post()
{
- while (not simcalls.empty()) {
- smx_simcall_t simcall = simcalls.front();
- simcalls.pop_front();
+ while (not simcalls_.empty()) {
+ smx_simcall_t simcall = simcalls_.front();
+ simcalls_.pop_front();
e_smx_state_t result;
switch (surf_sleep->get_state()) {
void simgrid::kernel::activity::IoImpl::post()
{
- for (smx_simcall_t const& simcall : simcalls) {
+ for (smx_simcall_t const& simcall : simcalls_) {
switch (simcall->call) {
case SIMCALL_STORAGE_WRITE:
simcall_storage_write__set__result(simcall, surf_io->get_cost());
switch (surf_io->get_state()) {
case simgrid::kernel::resource::Action::State::failed:
- state = SIMIX_FAILED;
+ state_ = SIMIX_FAILED;
break;
case simgrid::kernel::resource::Action::State::done:
- state = SIMIX_DONE;
+ state_ = SIMIX_DONE;
break;
default:
THROW_IMPOSSIBLE;
{
XBT_IN("(%p)",this);
if (sleep->get_state() == simgrid::kernel::resource::Action::State::failed)
- state = SIMIX_FAILED;
+ state_ = SIMIX_FAILED;
else if (sleep->get_state() == simgrid::kernel::resource::Action::State::done)
- state = SIMIX_SRC_TIMEOUT;
+ state_ = SIMIX_SRC_TIMEOUT;
SIMIX_synchro_finish(this);
XBT_OUT();
namespace s4u {
Comm::~Comm()
{
- if (state_ == State::started && not detached_ && (pimpl_ == nullptr || pimpl_->state == SIMIX_RUNNING)) {
+ if (state_ == State::started && not detached_ && (pimpl_ == nullptr || pimpl_->state_ == SIMIX_RUNNING)) {
XBT_INFO("Comm %p freed before its completion. Detached: %d, State: %d", this, detached_, (int)state_);
if (pimpl_ != nullptr)
- XBT_INFO("pimpl_->state: %d", pimpl_->state);
+ XBT_INFO("pimpl_->state: %d", pimpl_->state_);
else
XBT_INFO("pimpl_ is null");
xbt_backtrace_display_current();
if (comm->src_proc == process) {
XBT_DEBUG("Found an unfinished send comm %p (detached = %d), state %d, src = %p, dst = %p", comm.get(),
- comm->detached, (int)comm->state, comm->src_proc, comm->dst_proc);
+ comm->detached, (int)comm->state_, comm->src_proc, comm->dst_proc);
comm->src_proc = nullptr;
} else if (comm->dst_proc == process) {
- XBT_DEBUG("Found an unfinished recv comm %p, state %d, src = %p, dst = %p", comm.get(), (int)comm->state,
+ XBT_DEBUG("Found an unfinished recv comm %p, state %d, src = %p, dst = %p", comm.get(), (int)comm->state_,
comm->src_proc, comm->dst_proc);
comm->dst_proc = nullptr;
process->comms.remove(process->waiting_synchro);
comm->cancel();
// Remove first occurrence of &process->simcall:
- auto i = boost::range::find(process->waiting_synchro->simcalls, &process->simcall);
- if (i != process->waiting_synchro->simcalls.end())
- process->waiting_synchro->simcalls.remove(&process->simcall);
+ auto i = boost::range::find(process->waiting_synchro->simcalls_, &process->simcall);
+ if (i != process->waiting_synchro->simcalls_.end())
+ process->waiting_synchro->simcalls_.remove(&process->simcall);
} else if (sleep != nullptr) {
SIMIX_process_sleep_destroy(process->waiting_synchro);
if (process != simcall->issuer) {
SIMIX_simcall_answer(simcall);
} else {
- sync_suspend->simcalls.push_back(simcall);
+ sync_suspend->simcalls_.push_back(simcall);
process->waiting_synchro = sync_suspend;
process->waiting_synchro->suspend();
}
return;
}
smx_activity_t sync = SIMIX_process_join(simcall->issuer, process, timeout);
- sync->simcalls.push_back(simcall);
+ sync->simcalls_.push_back(simcall);
simcall->issuer->waiting_synchro = sync;
}
return;
}
smx_activity_t sync = simcall->issuer->sleep(duration);
- sync->simcalls.push_back(simcall);
+ sync->simcalls_.push_back(simcall);
simcall->issuer->waiting_synchro = sync;
}
XBT_INFO("Process %ld (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid,
process->get_cname(), process->host->get_cname(), synchro_description, process->waiting_synchro.get(),
- process->waiting_synchro->name.c_str(), (int)process->waiting_synchro->state);
+ process->waiting_synchro->name_.c_str(), (int)process->waiting_synchro->state_);
}
else {
XBT_INFO("Process %ld (%s@%s)", process->pid, process->get_cname(), process->host->get_cname());
simgrid::kernel::activity::ExecImplPtr exec = simgrid::kernel::activity::ExecImplPtr(
new simgrid::kernel::activity::ExecImpl(name, surf_action, /*timeout_detector*/ nullptr, host));
- XBT_DEBUG("Create execute synchro %p: %s", exec.get(), exec->name.c_str());
+ XBT_DEBUG("Create execute synchro %p: %s", exec.get(), exec->name_.c_str());
simgrid::kernel::activity::ExecImpl::onCreation(exec);
return exec;
void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_activity_t synchro)
{
- XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro.get(), (int)synchro->state);
+ XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro.get(), (int)synchro->state_);
/* Associate this simcall to the synchro */
- synchro->simcalls.push_back(simcall);
+ synchro->simcalls_.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
/* set surf's synchro */
if (MC_is_active() || MC_record_replay_is_active()) {
- synchro->state = SIMIX_DONE;
+ synchro->state_ = SIMIX_DONE;
SIMIX_execution_finish(synchro);
return;
}
/* If the synchro is already finished then perform the error handling */
- if (synchro->state != SIMIX_RUNNING)
+ if (synchro->state_ != SIMIX_RUNNING)
SIMIX_execution_finish(synchro);
}
void simcall_HANDLER_execution_test(smx_simcall_t simcall, smx_activity_t synchro)
{
- simcall_execution_test__set__result(simcall, (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING));
+ simcall_execution_test__set__result(simcall, (synchro->state_ != SIMIX_WAITING && synchro->state_ != SIMIX_RUNNING));
if (simcall_execution_test__get__result(simcall)) {
- synchro->simcalls.push_back(simcall);
+ synchro->simcalls_.push_back(simcall);
SIMIX_execution_finish(synchro);
} else {
SIMIX_simcall_answer(simcall);
}
/* If the synchro is already finished then perform the error handling */
- if (synchro->state != SIMIX_RUNNING)
+ if (synchro->state_ != SIMIX_RUNNING)
SIMIX_execution_finish(synchro);
}
simgrid::kernel::activity::ExecImplPtr exec =
boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(synchro);
- while (not synchro->simcalls.empty()) {
- smx_simcall_t simcall = synchro->simcalls.front();
- synchro->simcalls.pop_front();
- switch (exec->state) {
+ while (not synchro->simcalls_.empty()) {
+ smx_simcall_t simcall = synchro->simcalls_.front();
+ synchro->simcalls_.pop_front();
+ switch (exec->state_) {
case SIMIX_DONE:
/* do nothing, synchro done */
break;
default:
- xbt_die("Internal error in SIMIX_execution_finish: unexpected synchro state %d",
- (int)exec->state);
+ xbt_die("Internal error in SIMIX_execution_finish: unexpected synchro state %d", (int)exec->state_);
}
/* Fail the process if the host is down */
if (simcall->issuer->host->isOff())
simcall->issuer->context->iwannadie = 1;
simcall->issuer->waiting_synchro = nullptr;
- simcall_execution_wait__set__result(simcall, exec->state);
+ simcall_execution_wait__set__result(simcall, exec->state_);
SIMIX_simcall_answer(simcall);
}
}
void SIMIX_set_category(smx_activity_t synchro, const char *category)
{
- if (synchro->state != SIMIX_RUNNING)
+ if (synchro->state_ != SIMIX_RUNNING)
return;
simgrid::kernel::activity::ExecImplPtr exec =
void simcall_HANDLER_storage_read(smx_simcall_t simcall, surf_storage_t st, sg_size_t size)
{
smx_activity_t synchro = SIMIX_storage_read(st, size);
- synchro->simcalls.push_back(simcall);
+ synchro->simcalls_.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
}
void simcall_HANDLER_storage_write(smx_simcall_t simcall, surf_storage_t st, sg_size_t size)
{
smx_activity_t synchro = SIMIX_storage_write(st, size);
- synchro->simcalls.push_back(simcall);
+ synchro->simcalls_.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
}
void SIMIX_io_finish(smx_activity_t synchro)
{
- for (smx_simcall_t const& simcall : synchro->simcalls) {
- switch (synchro->state) {
+ for (smx_simcall_t const& simcall : synchro->simcalls_) {
+ switch (synchro->state_) {
case SIMIX_DONE:
/* do nothing, synchro done */
break;
SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Canceled");
break;
default:
- xbt_die("Internal error in SIMIX_io_finish: unexpected synchro state %d", static_cast<int>(synchro->state));
+ xbt_die("Internal error in SIMIX_io_finish: unexpected synchro state %d", static_cast<int>(synchro->state_));
}
if (simcall->issuer->host->isOff()) {
if (mbox->permanent_receiver != nullptr) {
//this mailbox is for small messages, which have to be sent right now
- other_comm->state = SIMIX_READY;
+ other_comm->state_ = SIMIX_READY;
other_comm->dst_proc=mbox->permanent_receiver.get();
mbox->done_comm_queue.push_back(other_comm);
XBT_DEBUG("pushing a message into the permanent receive list %p, comm %p", mbox, other_comm.get());
} else {
XBT_DEBUG("Receive already pushed");
- other_comm->state = SIMIX_READY;
+ other_comm->state_ = SIMIX_READY;
other_comm->type = SIMIX_COMM_READY;
}
src_proc->comms.push_back(other_comm);
if (MC_is_active() || MC_record_replay_is_active()) {
- other_comm->state = SIMIX_RUNNING;
+ other_comm->state_ = SIMIX_RUNNING;
return (detached ? nullptr : other_comm);
}
} else {
if (other_comm->surfAction_ && other_comm->remains() < 1e-12) {
XBT_DEBUG("comm %p has been already sent, and is finished, destroy it", other_comm.get());
- other_comm->state = SIMIX_DONE;
+ other_comm->state_ = SIMIX_DONE;
other_comm->type = SIMIX_COMM_DONE;
other_comm->mbox = nullptr;
}
} else {
XBT_DEBUG("Match my %p with the existing %p", this_synchro.get(), other_comm.get());
- other_comm->state = SIMIX_READY;
+ other_comm->state_ = SIMIX_READY;
other_comm->type = SIMIX_COMM_READY;
}
dst_proc->comms.push_back(other_comm);
other_comm->copy_data_fun = copy_data_fun;
if (MC_is_active() || MC_record_replay_is_active()) {
- other_comm->state = SIMIX_RUNNING;
+ other_comm->state_ = SIMIX_RUNNING;
return other_comm;
}
/* Associate this simcall to the wait synchro */
XBT_DEBUG("simcall_HANDLER_comm_wait, %p", synchro.get());
- synchro->simcalls.push_back(simcall);
+ synchro->simcalls_.push_back(simcall);
simcall->issuer->waiting_synchro = synchro;
if (MC_is_active() || MC_record_replay_is_active()) {
int idx = SIMCALL_GET_MC_VALUE(simcall);
if (idx == 0) {
- synchro->state = SIMIX_DONE;
+ synchro->state_ = SIMIX_DONE;
} else {
/* If we reached this point, the wait simcall must have a timeout */
/* Otherwise it shouldn't be enabled and executed by the MC */
simgrid::kernel::activity::CommImplPtr comm =
boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(synchro);
if (comm->src_proc == simcall->issuer)
- comm->state = SIMIX_SRC_TIMEOUT;
+ comm->state_ = SIMIX_SRC_TIMEOUT;
else
- comm->state = SIMIX_DST_TIMEOUT;
+ comm->state_ = SIMIX_DST_TIMEOUT;
}
SIMIX_comm_finish(synchro);
/* If the synchro has already finish perform the error handling, */
/* otherwise set up a waiting timeout on the right side */
- if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
+ if (synchro->state_ != SIMIX_WAITING && synchro->state_ != SIMIX_RUNNING) {
SIMIX_comm_finish(synchro);
} else { /* we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host
fails */
if (MC_is_active() || MC_record_replay_is_active()){
simcall_comm_test__set__result(simcall, comm->src_proc && comm->dst_proc);
if (simcall_comm_test__get__result(simcall)){
- synchro->state = SIMIX_DONE;
- synchro->simcalls.push_back(simcall);
+ synchro->state_ = SIMIX_DONE;
+ synchro->simcalls_.push_back(simcall);
SIMIX_comm_finish(synchro);
} else {
SIMIX_simcall_answer(simcall);
return;
}
- simcall_comm_test__set__result(simcall, (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING));
+ simcall_comm_test__set__result(simcall, (synchro->state_ != SIMIX_WAITING && synchro->state_ != SIMIX_RUNNING));
if (simcall_comm_test__get__result(simcall)) {
- synchro->simcalls.push_back(simcall);
+ synchro->simcalls_.push_back(simcall);
SIMIX_comm_finish(synchro);
} else {
SIMIX_simcall_answer(simcall);
}else{
simgrid::kernel::activity::ActivityImplPtr synchro = comms[idx];
simcall_comm_testany__set__result(simcall, idx);
- synchro->simcalls.push_back(simcall);
- synchro->state = SIMIX_DONE;
+ synchro->simcalls_.push_back(simcall);
+ synchro->state_ = SIMIX_DONE;
SIMIX_comm_finish(synchro);
}
return;
for (std::size_t i = 0; i != count; ++i) {
simgrid::kernel::activity::ActivityImplPtr synchro = comms[i];
- if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
+ if (synchro->state_ != SIMIX_WAITING && synchro->state_ != SIMIX_RUNNING) {
simcall_comm_testany__set__result(simcall, i);
- synchro->simcalls.push_back(simcall);
+ synchro->simcalls_.push_back(simcall);
SIMIX_comm_finish(synchro);
return;
}
xbt_die("Timeout not implemented for waitany in the model-checker");
int idx = SIMCALL_GET_MC_VALUE(simcall);
smx_activity_t synchro = xbt_dynar_get_as(synchros, idx, smx_activity_t);
- synchro->simcalls.push_back(simcall);
+ synchro->simcalls_.push_back(simcall);
simcall_comm_waitany__set__result(simcall, idx);
- synchro->state = SIMIX_DONE;
+ synchro->state_ = SIMIX_DONE;
SIMIX_comm_finish(synchro);
return;
}
xbt_dynar_foreach(synchros, cursor, ptr){
smx_activity_t synchro = simgrid::kernel::activity::ActivityImplPtr(ptr);
/* associate this simcall to the the synchro */
- synchro->simcalls.push_back(simcall);
+ synchro->simcalls_.push_back(simcall);
/* see if the synchro is already finished */
- if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING){
+ if (synchro->state_ != SIMIX_WAITING && synchro->state_ != SIMIX_RUNNING) {
SIMIX_comm_finish(synchro);
break;
}
smx_activity_t synchro = simgrid::kernel::activity::ActivityImplPtr(ptr);
// Remove the first occurence of simcall:
- auto i = boost::range::find(synchro->simcalls, simcall);
- if (i != synchro->simcalls.end())
- synchro->simcalls.erase(i);
+ auto i = boost::range::find(synchro->simcalls_, simcall);
+ if (i != synchro->simcalls_.end())
+ synchro->simcalls_.erase(i);
}
}
static inline void SIMIX_comm_start(simgrid::kernel::activity::CommImplPtr comm)
{
/* If both the sender and the receiver are already there, start the communication */
- if (comm->state == SIMIX_READY) {
+ if (comm->state_ == SIMIX_READY) {
simgrid::s4u::Host* sender = comm->src_proc->host;
simgrid::s4u::Host* receiver = comm->dst_proc->host;
comm->surfAction_ = surf_network_model->communicate(sender, receiver, comm->task_size, comm->rate);
comm->surfAction_->set_data(comm.get());
- comm->state = SIMIX_RUNNING;
+ comm->state_ = SIMIX_RUNNING;
XBT_DEBUG("Starting communication %p from '%s' to '%s' (surf_action: %p)", comm.get(), sender->get_cname(),
receiver->get_cname(), comm->surfAction_);
if (comm->surfAction_->get_state() == simgrid::kernel::resource::Action::State::failed) {
XBT_DEBUG("Communication from '%s' to '%s' failed to start because of a link failure", sender->get_cname(),
receiver->get_cname());
- comm->state = SIMIX_LINK_FAILURE;
+ comm->state_ = SIMIX_LINK_FAILURE;
comm->cleanupSurf();
}
simgrid::kernel::activity::CommImplPtr comm =
boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(synchro);
- while (not synchro->simcalls.empty()) {
- smx_simcall_t simcall = synchro->simcalls.front();
- synchro->simcalls.pop_front();
+ while (not synchro->simcalls_.empty()) {
+ smx_simcall_t simcall = synchro->simcalls_.front();
+ synchro->simcalls_.pop_front();
/* If a waitany simcall is waiting for this synchro to finish, then remove it from the other synchros in the waitany
* list. Afterwards, get the position of the actual synchro in the waitany dynar and return it as the result of the
if (comm->mbox)
comm->mbox->remove(comm);
- XBT_DEBUG("SIMIX_comm_finish: synchro state = %d", (int)synchro->state);
+ XBT_DEBUG("SIMIX_comm_finish: synchro state = %d", (int)synchro->state_);
/* Check out for errors */
simcall->issuer->context->iwannadie = 1;
SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
} else {
- switch (comm->state) {
+ switch (comm->state_) {
case SIMIX_DONE:
XBT_DEBUG("Communication %p complete!", synchro.get());
break;
default:
- xbt_die("Unexpected synchro state in SIMIX_comm_finish: %d", (int)synchro->state);
+ xbt_die("Unexpected synchro state in SIMIX_comm_finish: %d", (int)synchro->state_);
}
}
void SIMIX_synchro_finish(smx_activity_t synchro)
{
XBT_IN("(%p)", synchro.get());
- smx_simcall_t simcall = synchro->simcalls.front();
- synchro->simcalls.pop_front();
+ smx_simcall_t simcall = synchro->simcalls_.front();
+ synchro->simcalls_.pop_front();
- if (synchro->state != SIMIX_SRC_TIMEOUT) {
- if (synchro->state == SIMIX_FAILED)
+ if (synchro->state_ != SIMIX_SRC_TIMEOUT) {
+ if (synchro->state_ == SIMIX_FAILED)
simcall->issuer->context->iwannadie = 1;
else
THROW_IMPOSSIBLE;
XBT_DEBUG("Wait semaphore %p (timeout:%f)", sem, timeout);
if (sem->value <= 0) {
synchro = SIMIX_synchro_wait(issuer->host, timeout);
- synchro->simcalls.push_front(simcall);
+ synchro->simcalls_.push_front(simcall);
issuer->waiting_synchro = synchro;
sem->sleeping.push_back(*issuer);
} else {