Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Corrected some bugs, added the simix support to the other workstation
[simgrid.git] / src / simix / smx_config.c
index 106e9ec..ef77dd6 100644 (file)
@@ -1,9 +1,7 @@
 /* $Id$ */
 
-/* simix_config.c - support for SIMIX user configuration                      */
-
-/* Copyright (c) 2005 Martin Quinson.                                       */
-/* All rights reserved.                                                     */
+/* Copyright (c) 2007 Arnaud Legrand, Bruno Donassolo.
+   All rights reserved.                                          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -28,8 +26,10 @@ static void _simix_cfg_cb__surf_workstation_model(const char *name, int pos)
   /* New Module missing */
   xbt_assert1(!strcmp(val, "CLM03") ||
               !strcmp(val, "KCCFLN05") ||
-             !strcmp(val, "KCCFLN05_proportionnal"),
-              "Unknown workstation model: %s (either 'CLM03' or 'KCCFLN05'",val);
+             !strcmp(val, "KCCFLN05_proportional") ||
+             !strcmp(val, "KCCFLN05_Vegas") ||
+             !strcmp(val, "KCCFLN05_Reno"),
+              "Unknown workstation model: %s (choices are: 'CLM03', 'KCCFLN05', 'KCCFLN05_proportional', 'KCCFLN05_Vegas' and 'KCCFLN05_Reno'",val);
 }
 
 /* create the config set and register what should be */
@@ -59,27 +59,21 @@ void simix_config_finalize(void)
   _simix_init_status = 0;
 }
 
-/** \brief set a configuration variable
+/** \brief Set a configuration variable
  * 
- * Currently existing configuation variable:
+ * Currently existing configuration variable:
  *   - surf_workstation_model (string): Model of workstation to use.  
  *     Possible values (defaults to "KCCFLN05"):
  *     - "CLM03": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + support for parallel tasks
  *     - "KCCFLN05": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + failure handling + interference between communications and computations if precised in the platform file.
  * 
- * Example:
- * MSG_config("surf_workstation_model","KCCFLN05");
+ *     \param name Configuration variable name that will change.
+ *     \param pa A va_list with the others parameters
  */
-void SIMIX_config(const char *name, ...
+void SIMIX_config(const char *name, va_list pa
 {
-  va_list pa;
-    
   if (!_simix_init_status) {
     simix_config_init();
   }
-
-  va_start(pa,name);
   xbt_cfg_set_vargs(_simix_cfg_set,name,pa);
-  va_end(pa);
-
 }