X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fb261801437ba875a226a2c5da9f9785b9330581..b198d59656bf6bdd8684110edab4d97596aeee7a:/src/smpi/internals/smpi_process.cpp diff --git a/src/smpi/internals/smpi_process.cpp b/src/smpi/internals/smpi_process.cpp index f47b42d35c..4b55a615b7 100644 --- a/src/smpi/internals/smpi_process.cpp +++ b/src/smpi/internals/smpi_process.cpp @@ -67,13 +67,14 @@ void Process::set_data(int index, int* argc, char*** argv) { char* instance_id = (*argv)[1]; comm_world_ = smpi_deployment_comm_world(instance_id); - msg_bar_t bar = smpi_deployment_finalization_barrier(instance_id); - if (bar != nullptr) // don't overwrite the current one if the instance has none - finalization_barrier_ = bar; + msg_bar_t barrier = smpi_deployment_finalization_barrier(instance_id); + if (barrier != nullptr) // don't overwrite the current one if the instance has none + finalization_barrier_ = barrier; instance_id_ = instance_id; index_ = index; - static_cast(SIMIX_process_self()->userdata)->data = this; + process_ = SIMIX_process_self(); + static_cast(process_->userdata)->data = this; if (*argc > 3) { memmove(&(*argv)[0], &(*argv)[2], sizeof(char *) * (*argc - 2)); @@ -85,8 +86,7 @@ void Process::set_data(int index, int* argc, char*** argv) argv_ = argv; // 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_, process_); } /** @brief Prepares the current process for termination. */