X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8be93beba0c7547303f5a102c2cb528b8c586066..4272e5735e685afc759b02dfbcb08acaf462c791:/src/xbt/xbt_context.c diff --git a/src/xbt/xbt_context.c b/src/xbt/xbt_context.c index 418b125820..f3c9ecd62a 100644 --- a/src/xbt/xbt_context.c +++ b/src/xbt/xbt_context.c @@ -13,21 +13,17 @@ #include "xbt_context_factory.h" /* the context associated with the current process */ -static xbt_context_t -current_context = NULL; +xbt_context_t current_context = NULL; /* the context associated with the maestro */ -static xbt_context_t -maestro_context = NULL; +xbt_context_t maestro_context = NULL; /* this list contains the contexts to destroy */ -static xbt_swag_t -context_to_destroy = NULL; +xbt_swag_t context_to_destroy = NULL; /* this list contains the contexts in use */ -static xbt_swag_t -context_living = NULL; +xbt_swag_t context_living = NULL; /* the context factory used to create the appropriate context * each context implementation define its own context factory @@ -42,18 +38,6 @@ context_living = NULL; static xbt_context_factory_t context_factory = NULL; -/* java implementation of the context */ -#include "xbt_jcontext.c" - -#ifdef CONTEXT_THREADS -/* use the native thread implementation of the context */ -#include "xbt_thread_context.c" -#elif !defined(WIN32) -/* use the ucontext based context */ -# include "xbt_ucontext.c" -#endif - - /** * This function is call by the xbt_init() function to initialize the context module. */ @@ -116,9 +100,6 @@ xbt_context_mod_exit(void) /* remove the context of the scheduler from the list of the contexts in use */ xbt_swag_remove(maestro_context, context_living); - free(maestro_context); - maestro_context = current_context = NULL; - /* * kill all the contexts in use : * the killed contexts are added in the list of the contexts to destroy @@ -130,6 +111,9 @@ xbt_context_mod_exit(void) /* destroy all contexts in the list of contexts to destroy */ xbt_context_empty_trash(); + free(maestro_context); + maestro_context = current_context = NULL; + /* destroy the lists */ xbt_swag_free(context_to_destroy); xbt_swag_free(context_living);