From 87b89191e194d0e9080c102e309db6c5d45d37a0 Mon Sep 17 00:00:00 2001 From: cristianrosa Date: Tue, 1 Feb 2011 15:00:26 +0000 Subject: [PATCH 1/1] Optimization, if no parallel execution is selected use the serial execution. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9555 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/simix/smx_context_raw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simix/smx_context_raw.c b/src/simix/smx_context_raw.c index 5282293bb8..9b2ac2b68f 100644 --- a/src/simix/smx_context_raw.c +++ b/src/simix/smx_context_raw.c @@ -305,18 +305,18 @@ void SIMIX_ctx_raw_factory_init(smx_context_factory_t *factory) (*factory)->stop = smx_ctx_raw_stop; (*factory)->suspend = smx_ctx_raw_suspend; (*factory)->name = "smx_raw_context_factory"; - (*factory)->runall = smx_ctx_raw_runall; if (SIMIX_context_is_parallel()) { #ifdef CONTEXT_THREADS /* To use parallel ucontexts a thread pool is needed */ parmap = xbt_parmap_new(2); (*factory)->self = smx_ctx_raw_self_parallel; (*factory)->get_thread_id = smx_ctx_raw_get_thread_id; + (*factory)->runall = smx_ctx_raw_runall; #else THROW0(arg_error, 0, "No thread support for parallel context execution"); #endif } else { - (*factory)->runall = smx_ctx_raw_runall; + (*factory)->runall = smx_ctx_raw_runall_serial; } raw_factory = *factory; -- 2.20.1