Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename flag cfg=contexts/parallel to cfg=contexts/nthreads
authorthiery <thiery@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 1 Feb 2011 09:15:46 +0000 (09:15 +0000)
committerthiery <thiery@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 1 Feb 2011 09:15:46 +0000 (09:15 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9544 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/simix/context.h
src/simix/smx_context.c
src/surf/surf_config.c

index 0ba2a6c..e51262d 100644 (file)
@@ -91,8 +91,8 @@ smx_context_t smx_ctx_base_self(void);
 void *smx_ctx_base_get_data(smx_context_t context);
 
 /* parallelism */
-void SIMIX_context_set_parallel_threads(int nb_threads);
-int SIMIX_context_get_parallel_threads(void);
+void SIMIX_context_set_nthreads(int nb_threads);
+int SIMIX_context_get_nthreads(void);
 int SIMIX_context_is_parallel(void);
 
 SG_END_DECL()
index c2bf12d..9515444 100644 (file)
@@ -76,7 +76,7 @@ void SIMIX_context_mod_exit(void)
  *
  * \param nb_threads the number of threads to use
  */
-void SIMIX_context_set_parallel_threads(int nb_threads) {
+void SIMIX_context_set_nthreads(int nb_threads) {
 
   xbt_assert1(nb_threads > 0, "Invalid number of parallel threads: %d", nb_threads);
   smx_parallel_contexts = nb_threads;
@@ -87,7 +87,7 @@ void SIMIX_context_set_parallel_threads(int nb_threads) {
  * for the user contexts.
  * \return the number of threads (1 means no parallelism)
  */
-int SIMIX_context_get_parallel_threads() {
+int SIMIX_context_get_nthreads() {
   return smx_parallel_contexts;
 }
 
index eceaaa7..5227d67 100644 (file)
@@ -199,9 +199,9 @@ static void _surf_cfg_cb_context_stack_size(const char *name, int pos)
   smx_context_stack_size = xbt_cfg_get_int(_surf_cfg_set, name) * 1024;
 }
 
-static void _surf_cfg_cb_parallel_contexts(const char *name, int pos)
+static void _surf_cfg_cb_contexts_nthreads(const char *name, int pos)
 {
-  SIMIX_context_set_parallel_threads(xbt_cfg_get_int(_surf_cfg_set, name));
+  SIMIX_context_set_nthreads(xbt_cfg_get_int(_surf_cfg_set, name));
 }
 
 static void _surf_cfg_cb__surf_network_fullduplex(const char *name,
@@ -360,10 +360,10 @@ void surf_config_init(int *argc, char **argv)
 
     /* number of parallel threads for user processes */
     default_value_int = 1;
-    xbt_cfg_register(&_surf_cfg_set, "contexts/parallel",
+    xbt_cfg_register(&_surf_cfg_set, "contexts/nthreads",
                      "Number of parallel threads for user contexts (EXPERIMENTAL)",
                      xbt_cfgelm_int, &default_value_int, 1, 1,
-                     _surf_cfg_cb_parallel_contexts, NULL);
+                     _surf_cfg_cb_contexts_nthreads, NULL);
 
     default_value_int = 0;
     xbt_cfg_register(&_surf_cfg_set, "fullduplex",