X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ae66e43b95b26467c1cb9df271e83f51d3d7147b..39c6a42ab89e515e5be6f68c11cd3ba98b85cb47:/src/msg/m_process.c diff --git a/src/msg/m_process.c b/src/msg/m_process.c index 70f458b4a1..c3b04d11d3 100644 --- a/src/msg/m_process.c +++ b/src/msg/m_process.c @@ -16,6 +16,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg, "Logging specific to MSG (proc /** \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 \endhtmlonly * * We need to simulate many independent scheduling decisions, so @@ -232,7 +234,10 @@ m_process_t MSG_process_from_PID(int PID) */ 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); }