* @{
*/
+/* we need this symbol here, even if it breaks a bit the module separation */
+long int gras_os_getpid(void);
+
/** @brief different kind of errors */
typedef enum {
unknown_error=0, /**< unknown error */
char *host; /* NULL for localhost; hostname if remote */
/* FIXME: host should be hostname:port[#thread] */
char *procname;
+ long int pid;
char *file; /**< to be freed only for remote exceptions */
int line;
char *func; /**< to be freed only for remote exceptions */
/* the static and dynamic initializers for a context structure */
#define XBT_CTX_INITIALIZER \
{ NULL, 0, { /* content */ NULL, unknown_error, 0, \
- /* throw point*/ 0,NULL, NULL, NULL, 0, NULL,\
+ /* throw point*/ 0,NULL, NULL,0, NULL, 0, NULL,\
/* backtrace */ 0,NULL,{NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL} } }
#define XBT_CTX_INITIALIZE(ctx) \
do { \
(ctx)->ctx_ex.remote = 0; \
(ctx)->ctx_ex.host = NULL; \
(ctx)->ctx_ex.procname = NULL; \
+ (ctx)->ctx_ex.pid = 0; \
(ctx)->ctx_ex.file = NULL; \
(ctx)->ctx_ex.line = 0; \
(ctx)->ctx_ex.func = NULL; \
__xbt_ex_ctx()->ctx_ex.remote = 0; \
__xbt_ex_ctx()->ctx_ex.host = (char*)NULL; \
__xbt_ex_ctx()->ctx_ex.procname = (char*)xbt_procname(); \
+ __xbt_ex_ctx()->ctx_ex.pid = gras_os_getpid(); \
__xbt_ex_ctx()->ctx_ex.file = (char*)__FILE__; \
__xbt_ex_ctx()->ctx_ex.line = __LINE__; \
__xbt_ex_ctx()->ctx_ex.func = (char*)_XBT_FUNCTION; \
gras_datadesc_struct_append(ddt,"host",gras_datadesc_by_name("string"));
gras_datadesc_struct_append(ddt,"procname",gras_datadesc_by_name("string"));
+ gras_datadesc_struct_append(ddt,"pid",gras_datadesc_by_name("long int"));
gras_datadesc_struct_append(ddt,"file",gras_datadesc_by_name("string"));
gras_datadesc_struct_append(ddt,"line",gras_datadesc_by_name("int"));
gras_datadesc_struct_append(ddt,"func",gras_datadesc_by_name("string"));