-/**
- * \brief Cleans the MSG data of an actor
- * \param smx_actor a SIMIX actor
- */
-void MSG_process_cleanup_from_SIMIX(smx_actor_t smx_actor)
-{
- simgrid::msg::ActorExt* msg_actor;
-
- // get the MSG process from the SIMIX process
- if (smx_actor == SIMIX_process_self()) {
- /* avoid a SIMIX request if this function is called by the process itself */
- msg_actor = (simgrid::msg::ActorExt*)SIMIX_process_self_get_data();
- SIMIX_process_self_set_data(nullptr);
- } else {
- msg_actor = (simgrid::msg::ActorExt*)smx_actor->getUserData();
- simcall_process_set_data(smx_actor, nullptr);
- }
-
- if (TRACE_actor_is_enabled())
- simgrid::instr::Container::by_name(instr_pid(smx_actor->ciface()))->remove_from_parent();
-
- // free the data if a function was provided
- if (msg_actor && msg_actor->data && msg_global->process_data_cleanup) {
- msg_global->process_data_cleanup(msg_actor->data);
- }
-
- delete msg_actor;
- SIMIX_process_cleanup(smx_actor);
-}