Silent some gcc "no previous prototype" build warnings.
[bertos.git] / bertos / kern / preempt.c
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