Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make sure the navbar tricks we use in the post-processor don't land in the short...
[simgrid.git] / src / msg / m_process.c
index 06f85c3810baf994665201c3b113c47d514bd295..d49a58ac306946d55663eb6acc82fb3646912696 100644 (file)
@@ -13,6 +13,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg,
 
 /** \defgroup m_process_management Management Functions of Agents
  *  \brief This section describes the agent structure of MSG
+ */
+/** \addtogroup m_process_management
  *  (#m_process_t) and the functions for managing it.
  *    \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Agents" --> \endhtmlonly
  * 
@@ -179,7 +181,7 @@ void MSG_process_kill(m_process_t process)
 
   xbt_fifo_remove(msg_global->process_to_run,process);
   xbt_fifo_remove(msg_global->process_list,process);
-  xbt_context_free(process->simdata->context);
+  xbt_context_kill(process->simdata->context);
 
   if(process==MSG_process_self()) {
     /* I just killed myself */
@@ -493,6 +495,8 @@ int __MSG_process_block(double max_duration, const char *info)
     DEBUG0("I've been resumed, let's keep going");    
   }
 
+  PAJE_PROCESS_POP_STATE(process);
+
   XBT_OUT;
   return 1;
 }
@@ -519,8 +523,6 @@ MSG_error_t __MSG_process_unblock(m_process_t process)
 
   surf_workstation_resource->common_public->resume(simdata_task->compute);
 
-  PAJE_PROCESS_POP_STATE(process);
-
   XBT_OUT;
 
   MSG_RETURN(MSG_OK);