Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Convert GRAS pid from long int to int; setup a virtualization layer in XBT to choose...
[simgrid.git] / src / xbt / ex.c
index d51f990..645acba 100644 (file)
@@ -245,16 +245,16 @@ void xbt_ex_display(xbt_ex_t *e)  {
   char *thrower=NULL;
 
   if (e->remote)
-    bprintf(" on host %s(%ld)",e->host,e->pid);
+    bprintf(" on host %s(%d)",e->host,e->pid);
 
-  CRITICAL1("%s",e->msg);
   fprintf(stderr,
-         "** SimGrid: UNCAUGHT EXCEPTION received on %s(%ld): category: %s; value: %d\n"
+         "** SimGrid: UNCAUGHT EXCEPTION received on %s(%d): category: %s; value: %d\n"
          "** %s\n"
          "** Thrown by %s()%s\n",
-         gras_os_myname(),gras_os_getpid(),
+         gras_os_myname(),(*xbt_getpid)(),
          xbt_ex_catname(e->category), e->value, e->msg,
          e->procname,thrower?thrower:" in this process");
+  CRITICAL1("%s",e->msg);
 
   if (thrower)
     free(thrower);
@@ -288,8 +288,8 @@ void __xbt_ex_terminate_default(xbt_ex_t *e)  {
 }
 
 /* the externally visible API */
-ex_ctx_cb_t XBT_PUBLIC_DATA  __xbt_ex_ctx       = &__xbt_ex_ctx_default;
-ex_term_cb_t XBT_PUBLIC_DATA __xbt_ex_terminate = &__xbt_ex_terminate_default;
+XBT_PUBLIC_DATA(ex_ctx_cb_t)  __xbt_ex_ctx       = &__xbt_ex_ctx_default;
+XBT_PUBLIC_DATA(ex_term_cb_t) __xbt_ex_terminate = &__xbt_ex_terminate_default;
 
 
 void xbt_ex_free(xbt_ex_t e) {