Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
process_{init,exit} from within gras_{init,exit}
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 5 Jul 2004 23:11:31 +0000 (23:11 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 5 Jul 2004 23:11:31 +0000 (23:11 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@164 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/gras_stub_generator
src/xbt/module.c

index 9670c75..174af65 100755 (executable)
@@ -59,10 +59,7 @@ foreach (keys %process) {
     print OUT<<EOF
 int launch_$_(int argc, char *argv[]) {
     
-  if (gras_process_init()) exit(1);
   $_(argc,argv);
-  if (gras_process_exit()) exit(1);
-
   return 0;
 }
 
@@ -128,9 +125,7 @@ int main(int argc, char *argv[]){
   int errcode;
 
   gras_init(&argc,argv);
-  gras_process_init();
   errcode=$pname(argc,argv);
-  gras_process_exit();
   gras_exit();
  
   return errcode;
index 1398642..403ed7b 100644 (file)
@@ -65,6 +65,7 @@ gras_init_defaultlog(int *argc,char **argv, const char *defaultlog) {
      TRYFAIL(gras_log_control_set(defaultlog));
   }
    
+  gras_process_init(); /* calls procdata_init, which calls dynar_new */
   /** init other submodules */
   gras_msg_init();
   gras_trp_init();
@@ -79,6 +80,7 @@ gras_init_defaultlog(int *argc,char **argv, const char *defaultlog) {
 void 
 gras_exit(){
   INFO0("Exiting GRAS");
+  gras_process_exit();
   gras_msg_exit();
   gras_trp_exit();
   gras_datadesc_exit();