-/**
- * \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 CONTEXT_THREADS
- /* Launch the thread */
- DEBUG3("**[ctx:%p;self:%p]** Locking creation_mutex %p ****", context,
- xbt_os_thread_self(), creation_mutex);
- xbt_os_mutex_lock(creation_mutex);
-
- DEBUG2("**[ctx:%p;self:%p]** Thread create ****", context,
- xbt_os_thread_self());
- context->thread = xbt_os_thread_create(__context_wrapper, context);
- DEBUG3("**[ctx:%p;self:%p]** Thread created : %p ****", context,
- xbt_os_thread_self(), context->thread);
-
- DEBUG4
- ("**[ctx:%p;self:%p]** Going to jail on creation_cond/mutex (%p,%p) ****",
- context, xbt_os_thread_self(), creation_cond, creation_mutex);
- xbt_os_cond_wait(creation_cond, creation_mutex);
- DEBUG3("**[ctx:%p;self:%p]** Unlocking creation %p ****", context,
- xbt_os_thread_self(), creation_mutex);
- xbt_os_mutex_unlock(creation_mutex);
-#else
- makecontext(&(context->uc), (void (*)(void)) __context_wrapper, 1,
- context);
-#endif
- return;
-}