X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fcoop.c;h=078724b42a8e38095fb93e3c6e226d2e2b5e2d70;hb=7166a2cb55a257889ffc8f0199d048409449f89a;hp=1b2e1bb9bc42497a193d12e736642f8155b67250;hpb=d9d931610bca1df6ceb9227eacc9ff2c7f89b77a;p=bertos.git diff --git a/bertos/kern/coop.c b/bertos/kern/coop.c index 1b2e1bb9..078724b4 100644 --- a/bertos/kern/coop.c +++ b/bertos/kern/coop.c @@ -26,50 +26,7 @@ * invalidate any other reasons why the executable file might be covered by * the GNU General Public License. * - * Copyright 2001, 2004, 2008 Develer S.r.l. (http://www.develer.com/) - * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti - * --> - * - * \brief Simple cooperative multitasking scheduler. - * - * \version $Id$ - * \author Bernie Innocenti - * \author Stefano Fedrigo - */ - -#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 - -#include -#include -#include -#include - -/** - * Define function prototypes exported outside. + * \note This file is deprecated and kept only for backward compatibility. * - * Required to silent gcc "no previous prototype" warnings. - */ -void coop_yield(void); -void coop_switch(void); - -void coop_switch(void) -{ - IRQ_ASSERT_ENABLED(); - - ATOMIC(proc_schedule()); -} - -/** - * Co-operative context switch + * --> */ -void coop_yield(void) -{ - ATOMIC(SCHED_ENQUEUE(current_process)); - coop_switch(); -}