- * Copyright 2001, 2004, 2008 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
- * -->
- *
- * \brief Simple cooperative multitasking scheduler.
- *
- * \version $Id$
- * \author Bernie Innocenti <bernie@codewiz.org>
- * \author Stefano Fedrigo <aleph@develer.com>
- */
-
-#include "proc_p.h"
-#include "proc.h"
-
-// Log settings for cfg/log.h.
-#define LOG_LEVEL KERN_LOG_LEVEL
-#define LOG_FORMAT KERN_LOG_FORMAT
-#include <cfg/log.h>
-
-#include <cpu/irq.h>
-#include <cpu/types.h>
-#include <cpu/attr.h>
-#include <cpu/frame.h>
-
-/**
- * Define function prototypes exported outside.
- *
- * Required to silent gcc "no previous prototype" warnings.
- */
-void coop_yield(void);
-void coop_switch(void);
-void coop_wakeup(Process *proc);
-
-static void coop_switchTo(Process *proc)
-{
- Process *old_process = current_process;
-
- SCHED_ENQUEUE(current_process);
- current_process = proc;
- proc_switchTo(current_process, old_process);
-}
-
-/**
- * Give the control of the CPU to another process.
- *
- * \note Assume the current process has been already added to a wait queue.