+ while((context=xbt_swag_extract(context_to_destroy)))
+ xbt_context_destroy(context);
+}
+
+/**
+ * \param context the context to start
+ *
+ * Calling this function prepares \a context to be run. It will
+ however run effectively only when calling #xbt_context_schedule
+ */
+void xbt_context_start(xbt_context_t context)
+{
+#ifdef USE_PTHREADS
+ /* Launch the thread */
+ DEBUG1("**[%p]** Locking ****",context);
+ pthread_mutex_lock(&(context->mutex));
+ DEBUG1("**[%p]** Pthread create ****",context);
+ xbt_assert0(!pthread_create(context->thread, NULL, __context_wrapper, context),
+ "Unable to create a thread.");
+ DEBUG2("**[%p]** Pthread created : %p ****",context,(void*)(*(context->thread)));
+ DEBUG1("**[%p]** Going to jail ****",context);
+ pthread_cond_wait(&(context->cond), &(context->mutex));
+ DEBUG1("**[%p]** Unlocking ****",context);
+ pthread_mutex_unlock(&(context->mutex));
+#else