From: Arnaud Giersch Date: Tue, 1 Oct 2013 13:18:13 +0000 (+0200) Subject: Fix default context factory. X-Git-Tag: v3_9_90~56^2~6 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6024c6e3f15a8061c1e8e82dfb4b9700851a2110 Fix default context factory. --- diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index 1b188b55c5..994bc19ee3 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -602,13 +602,9 @@ void sg_config_init(int *argc, char **argv) /* context factory */ xbt_cfg_register(&_sg_cfg_set, "contexts/factory", - "Context factory to use in SIMIX (ucontext, thread or raw)", + "Context factory to use in SIMIX (default, ucontext, thread or raw)", xbt_cfgelm_string, 1, 1, _sg_cfg_cb_context_factory, NULL); -#ifndef WIN32 - xbt_cfg_setdefault_string(_sg_cfg_set, "contexts/factory", "ucontext"); -#else - xbt_cfg_setdefault_string(_sg_cfg_set, "contexts/factory", "raw"); -#endif + xbt_cfg_setdefault_string(_sg_cfg_set, "contexts/factory", "default"); /* stack size of contexts in Ko */ xbt_cfg_register(&_sg_cfg_set, "contexts/stack_size", diff --git a/src/simix/smx_context.c b/src/simix/smx_context.c index 791a73e869..c05ef67f63 100644 --- a/src/simix/smx_context.c +++ b/src/simix/smx_context.c @@ -48,7 +48,8 @@ void SIMIX_context_mod_init(void) } else { /* use the factory specified by --cfg=contexts/factory:value */ - if (smx_context_factory_name == NULL) { + if (smx_context_factory_name == NULL || + !strcmp(smx_context_factory_name, "default")) { /* use the default factory */ #ifdef HAVE_RAWCTX SIMIX_ctx_raw_factory_init(&simix_global->context_factory);