Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Let xbt_exit() issue a warning stating that this is now a no-op
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 6 May 2010 23:42:09 +0000 (23:42 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 6 May 2010 23:42:09 +0000 (23:42 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7708 48e7efb5-ca39-0410-a469-dd3cf9ba447f

14 files changed:
ChangeLog
examples/xbt/sem_basic.c
examples/xbt/sem_sched.c
src/gras/gras.c
src/simgrid_units_main.c
src/surf/surf.c
src/xbt/xbt_main.c
teshsuite/xbt/log_large_test.c
testsuite/surf/lmm_usage.c
testsuite/xbt/log_usage.c
tools/sg_unit_extractor.pl
tools/tesh/tesh.c
tools/tesh2/src/main.c
win32_testsuite/borland/builder6/simulation/xbt/log_usage/log_usage.c

index 0e8f1ef..ac934d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,7 +9,7 @@ SimGrid (3.5) unstable; urgency=low
  * Use library init/fini functions for our initialization.
    - you can use logs and other feature as soon as you want in your
      code (even before the xbt_init / MSG_init)
-   - xbt_exit is now a no-op.
+   - xbt_exit is now a no-op and produce a warning when used.
 
  -- Da SimGrid team <simgrid-devel@lists.gforge.inria.fr> 
 
index 6185ad3..dad97af 100644 (file)
@@ -67,8 +67,6 @@ main(int argc, char* argv[])
        
        INFO1("sem_basic terminated with exit code %d (success)",EXIT_SUCCESS);
 
-       xbt_exit();
-       
        return EXIT_SUCCESS;
                
 }
index b0f2f1d..ab14ee1 100644 (file)
@@ -127,7 +127,6 @@ main(int argc, char* argv[])
        if(!sched)
        {
                INFO1("sched_new() failed : errno %d",errno);
-               xbt_exit();
                exit(EXIT_FAILURE);
        }
        
@@ -149,7 +148,6 @@ main(int argc, char* argv[])
        {
                sched_free(&sched);
                INFO1("sched_init() failed : errno %d\n",errno);
-               xbt_exit();
                exit(EXIT_FAILURE);
        }
        
@@ -158,7 +156,6 @@ main(int argc, char* argv[])
        {
                sched_free(&sched);
                INFO1("sched_init() failed : errno %d",errno);
-               xbt_exit();
                exit(EXIT_FAILURE);
        }
        
@@ -167,7 +164,6 @@ main(int argc, char* argv[])
        {
                sched_free(&sched);
                INFO1("sched_init() failed : errno %d",errno);
-               xbt_exit();
                exit(EXIT_FAILURE);
        }
        
@@ -176,8 +172,6 @@ main(int argc, char* argv[])
        
        INFO1("sem_sched terminated with exit code %d (success)",EXIT_SUCCESS);
 
-       xbt_exit();
-       
        return EXIT_SUCCESS;
                
 }
index 6d1a53f..9e826f7 100644 (file)
@@ -157,7 +157,6 @@ void gras_exit(void)
     gras_emul_exit();
     gras_moddata_exit();
   }
-  xbt_exit();
 }
 
 const char *hexa_str(unsigned char *data, int size, int downside)
index 20d67e4..2b2852a 100644 (file)
@@ -204,7 +204,6 @@ int main(int argc, char *argv[]) {
       
   res = xbt_test_run(selection);
   xbt_test_exit();
-  xbt_exit();
   return res;
 }
 /*******************************/
index 35f7037..95a6dca 100644 (file)
@@ -337,7 +337,6 @@ void surf_exit(void)
   surf_parse_free_callbacks();
   xbt_dict_free(&route_table);
   NOW = 0;                      /* Just in case the user plans to restart the simulation afterward */
-  xbt_exit();
 }
 
 void surf_presolve(void)
index 337164d..a9a71f8 100644 (file)
@@ -138,6 +138,7 @@ void xbt_init(int *argc, char **argv)
 
 /** @brief Finalize the xbt mechanisms. */
 void xbt_exit() {
+  WARN0("This function is deprecated, you shouldn't use it");
 }
 
 
index 4e0559d..aab5f27 100644 (file)
@@ -43,6 +43,5 @@ int main(int argc, char *argv[])
   INFO1("Done (strlen>%d)", (int) (10 * strlen(tmp)));
   free(tmp);
 
-  xbt_exit();
   return 0;
 }
index df8857c..b47fbff 100644 (file)
@@ -485,6 +485,5 @@ int main(int argc, char **argv)
   INFO0("***** Test 3 (Lagrange - Reno)");
   test3(LAGRANGE_RENO);
 
-  xbt_exit();
   return 0;
 }
index 4266e9d..64a3cd1 100644 (file)
@@ -43,6 +43,5 @@ int main(int argc, char **argv)
   dolog(" test.thres:verbose root.thres:error ");
   dolog(" test.thres:critical ");
 
-  xbt_exit();
   return 0;
 }
index 24a1168..94563d8 100755 (executable)
@@ -164,7 +164,6 @@ int main(int argc, char *argv[]) {
       
   res = xbt_test_run(selection);
   xbt_test_exit();
-  xbt_exit();
   return res;
 }
 EOF
index c9da30d..15c0053 100644 (file)
@@ -249,6 +249,5 @@ int main(int argc, char *argv[])
   }
 
   rctx_exit();
-  xbt_exit();
   return 0;
 }
index 44293c8..3a8e7b9 100644 (file)
@@ -631,7 +631,6 @@ finalize(void)
                free(err_line);
        
        /* exit from the xbt framework */
-       xbt_exit();
 
        finalized = 1;
        
index ec070ce..e5922d1 100644 (file)
@@ -24,7 +24,6 @@ int main(int argc, char **argv)
        CDEBUG2(top, "val=%d%s", 3, "!");
        CRITICAL6("false alarm%s%s%s%s%s%s", "","","","","","!");
        
-       xbt_exit();
        return 0;
 }