void gras_init(int *argc, char **argv)
{
-
+ int first = 0;
gras_procdata_t *pd;
gras_msg_procdata_t msg_pd;
VERB0("Initialize GRAS");
* - 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);
gras_trp_register();
gras_msg_register();
}
+ gras_running_process++;
/*
* Initialize the process specific stuff
/*
* 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();