From 6fa2660c8ba089bbf8a1d711f46f882604ff9a6c Mon Sep 17 00:00:00 2001 From: arighi Date: Thu, 18 Mar 2010 15:46:23 +0000 Subject: [PATCH] Silent some gcc "no previous prototype" build warnings. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3242 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/kern/coop.c | 7 +++++++ bertos/kern/preempt.c | 15 +++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/bertos/kern/coop.c b/bertos/kern/coop.c index 21731260..c874ca36 100644 --- a/bertos/kern/coop.c +++ b/bertos/kern/coop.c @@ -58,6 +58,13 @@ */ EXTERN_C void asm_switch_context(cpu_stack_t **new_sp, cpu_stack_t **save_sp); +/** + * Define function prototypes exported outside. + * + * Required to silent gcc "no previous prototype" warnings. + */ +void coop_yield(void); +void coop_switch(void); /** * System scheduler: pass CPU control to the next process in diff --git a/bertos/kern/preempt.c b/bertos/kern/preempt.c index d3d9badf..2f44164b 100644 --- a/bertos/kern/preempt.c +++ b/bertos/kern/preempt.c @@ -86,8 +86,6 @@ #include "cfg/cfg_proc.h" -#if CONFIG_KERN_PREEMPT - #include "proc_p.h" #include "proc.h" @@ -123,6 +121,17 @@ cpu_atomic_t preempt_count; */ int _proc_quantum; +/** + * Define function prototypes exported outside. + * + * Required to silent gcc "no previous prototype" warnings. + */ +void preempt_yield(void); +int preempt_needPreempt(void); +void preempt_preempt(void); +void preempt_switch(void); +void preempt_init(void); + /** * Call the scheduler and eventually replace the current running process. */ @@ -233,5 +242,3 @@ void preempt_init(void) idle_init(); MOD_INIT(preempt); } - -#endif // CONFIG_KERN_PREEMPT -- 2.25.1