/** \defgroup m_process_management Management Functions of Agents
* \brief This section describes the agent structure of MSG
* (#m_process_t) and the functions for managing it.
+ */
+/** @addtogroup m_process_management
* \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Agents" --> \endhtmlonly
*
* We need to simulate many independent scheduling decisions, so
*/
int MSG_process_get_PID(m_process_t process)
{
- xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters");
+ /* Do not raise an exception here: this function is used in the logs,
+ and it will be called back by the exception handling stuff */
+ if (process == NULL || process->simdata == NULL)
+ return -1;
return (((simdata_process_t) process->simdata)->PID);
}