Silent some gcc "no previous prototype" build warnings.
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 18 Mar 2010 15:46:23 +0000 (15:46 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 18 Mar 2010 15:46:23 +0000 (15:46 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3242 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/kern/coop.c
bertos/kern/preempt.c

index 2173126017acf0ffb2187ae5b0a3fb6f085c1ef2..c874ca36f8bdaac539f3078c4b70efc5fe6e79c5 100644 (file)
  */
 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
index d3d9badf98f18f688c77f873c91f81aed0ba2818..2f44164b20174382c48355b08842fe2e314b5e51 100644 (file)
@@ -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