XBT_PUBLIC(smx_ctx_factory_initializer_t) smx_factory_initializer_to_use;
extern char* smx_context_factory_name;
extern int smx_context_stack_size;
+extern int smx_context_stack_size_was_set;
#ifdef HAVE_THREAD_LOCAL_STORAGE
extern __thread smx_context_t smx_current_context;
char* smx_context_factory_name = NULL; /* factory name specified by --cfg=contexts/factory:value */
smx_ctx_factory_initializer_t smx_factory_initializer_to_use = NULL;
int smx_context_stack_size = 128 * 1024;
-
+int smx_context_stack_size_was_set = 0;
#ifdef HAVE_THREAD_LOCAL_STORAGE
static __thread smx_context_t smx_current_context_parallel;
#else
if (code) {
context->begin = xbt_os_sem_init(0);
context->end = xbt_os_sem_init(0);
- xbt_os_thread_setstacksize(smx_context_stack_size);
+ if(smx_context_stack_size_was_set)xbt_os_thread_setstacksize(smx_context_stack_size);
/* create and start the process */
/* NOTE: The first argument to xbt_os_thread_create used to be the process *