From 6024c6e3f15a8061c1e8e82dfb4b9700851a2110 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 1 Oct 2013 15:18:13 +0200 Subject: [PATCH] Fix default context factory. --- src/simgrid/sg_config.c | 8 ++------ src/simix/smx_context.c | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) 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); -- 2.20.1