#endif
}
-void Process::set_data(int index, int *argc, char ***argv)
+void Process::set_data(int index, int* argc, char*** argv)
{
char* instance_id = (*argv)[1];
msg_bar_t bar = smpi_deployment_finalization_barrier(instance_id);
if (bar!=nullptr) // don't overwrite the default one
finalization_barrier_ = bar;
- index_ = index;
instance_id_ = instance_id;
+ index_ = index;
static_cast<simgrid::MsgActorExt*>(SIMIX_process_self()->data)->data = this;
// set the process attached to the mailbox
mailbox_small_->setReceiver(simgrid::s4u::Actor::self());
process_ = SIMIX_process_self();
- XBT_DEBUG("<%d> New process in the game: %p", index, SIMIX_process_self());
+ XBT_DEBUG("<%d> New process in the game: %p", index_, SIMIX_process_self());
}
-void Process::destroy()
+/** @brief Prepares the current process for termination. */
+void Process::finalize()
{
- if(smpi_privatize_global_variables){
- smpi_switch_data_segment(index_);
- }
state_ = SMPI_FINALIZED;
XBT_DEBUG("<%d> Process left the game", index_);
-}
-/** @brief Prepares the current process for termination. */
-void Process::finalize()
-{
// This leads to an explosion of the search graph which cannot be reduced:
if(MC_is_active() || MC_record_replay_is_active())
return;
return false;
}
-void Process::set_user_data(void *data)
-{
- data_ = data;
-}
-
-void *Process::get_user_data()
-{
- return data_;
-}
-
smx_actor_t Process::process(){
return process_;
}
int rank = xbt_str_parse_int((*argv)[2], "Invalid rank: %s");
smpi_deployment_register_process(instance_id, rank, index);
- if(smpi_privatize_global_variables){
+ if(smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP){
/* Now using segment index of the process */
index = proc->segment_index;
/* Done at the process's creation */