- DEBUG1("Kill process '%s'", process->name);
- process->iwannadie = 1;
- //smx_ctx_thread_swap(process);
-}
-
-/**
- * \param context the winner
- *
- * Calling this function blocks the current context and schedule \a context.
- * When \a context will call smx_context_yield, it will return
- * to this function as if nothing had happened.
- *
- * Only the maestro can call this function to run a given process.
- */
-static void smx_ctx_thread_schedule(smx_process_t process)
-{
- DEBUG1("Schedule process '%s'", process->name);
- /*xbt_assert0((simix_global->current_process == simix_global->maestro_process),
- "You are not supposed to run this function here!");*/
- smx_ctx_thread_resume(process);
- /*smx_ctx_thread_swap(process);*/
-}
-
-/**
- * Calling this function makes the current context yield. The context
- * that scheduled it returns from smx_context_schedule as if nothing
- * had happened.
- *
- * Only the processes can call this function, giving back the control
- * to the maestro
- */
-static void smx_ctx_thread_yield(void)
-{
- smx_ctx_thread_suspend(simix_global->current_process);
-}
-
-static void smx_ctx_thread_start(smx_process_t process)
-{
- smx_ctx_thread_t ctx_thread = (smx_ctx_thread_t) process->context;
-
- DEBUG1("Start context '%s'", process->name);
- /* create and start the process */
- ctx_thread->thread =
- xbt_os_thread_create(process->name, smx_ctx_thread_wrapper,
- ctx_thread);