X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a5afaee62be6661d36a8d42cb727d28833d17d7e..7323d3b99c25003014fee1241858445f0c61aeb5:/src/gras/gras.c diff --git a/src/gras/gras.c b/src/gras/gras.c index 9e826f72ac..33adad5d44 100644 --- a/src/gras/gras.c +++ b/src/gras/gras.c @@ -29,7 +29,7 @@ static int gras_running_process = 0; #if defined(HAVE_SIGNAL) && defined(HAVE_SIGNAL_H) static void gras_sigusr_handler(int sig) { - INFO0("SIGUSR1 received. Display the backtrace"); + XBT_INFO("SIGUSR1 received. Display the backtrace"); xbt_backtrace_display_current(); } @@ -70,10 +70,10 @@ XBT_LOG_EXTERNAL_CATEGORY(gras_virtu_process); void gras_init(int *argc, char **argv) { - + int first = 0; gras_procdata_t *pd; gras_msg_procdata_t msg_pd; - VERB0("Initialize GRAS"); + XBT_VERB("Initialize GRAS"); xbt_getpid = gras_os_getpid; /* First initialize the XBT */ @@ -83,6 +83,7 @@ void gras_init(int *argc, char **argv) * - declare process specific data we need (without creating them) */ if (gras_running_process == 0) { + first = 1; /* Connect our log channels: that must be done manually under windows */ XBT_LOG_CONNECT(gras_ddt, gras); XBT_LOG_CONNECT(gras_ddt_cbps, gras_ddt); @@ -110,6 +111,7 @@ void gras_init(int *argc, char **argv) gras_trp_register(); gras_msg_register(); } + gras_running_process++; /* * Initialize the process specific stuff @@ -119,7 +121,7 @@ void gras_init(int *argc, char **argv) /* * Initialize the global stuff if it's not the first process created */ - if (gras_running_process++ == 0) { + if (first) { gras_emul_init(); gras_msg_init(); gras_trp_init(); @@ -144,7 +146,7 @@ void gras_init(int *argc, char **argv) void gras_exit(void) { gras_procdata_t *pd; - INFO0("Exiting GRAS"); + XBT_INFO("Exiting GRAS"); amok_exit(); gras_moddata_leave(); pd = gras_procdata_get();