monitor_checkStack(): simplify and fix the degenerate case sp_size == 0
[bertos.git] / bertos / kern / proc.h
index 0071ca13f41d3b779ab7630162598dae8aaaab55..482fb7a39708f3a1193f1e0b2689322dded7bbbe 100644 (file)
  * invalidate any other reasons why the executable file might be covered by
  * the GNU General Public License.
  *
- * Copyright 2001,2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999,2000,2001 Bernie Innocenti <bernie@codewiz.org>
- *
+ * Copyright 2001, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
  * -->
  *
  * \brief Process scheduler (public interface).
  *
  * \version $Id$
- *
  * \author Bernie Innocenti <bernie@codewiz.org>
  */
 #ifndef KERN_PROC_H
@@ -59,7 +57,9 @@ struct Process *proc_new_with_name(const char* name, void (*entry)(void), iptr_t
 #endif
 
 void proc_exit(void);
-void proc_switch(void);
+void proc_yield(void);
+#define proc_switch proc_yield /* OBSOLETE */
+
 int proc_testSetup(void);
 int proc_testRun(void);
 int proc_testTearDown(void);
@@ -68,7 +68,7 @@ struct Process *proc_current(void);
 iptr_t proc_current_user_data(void);
 void proc_rename(struct Process *proc, const char* name);
 
-#if CONFIG_KERN_PREEMPTIVE
+#if CONFIG_KERN_PREEMPT
        void proc_forbid(void);
        void proc_permit(void);
 #else
@@ -117,9 +117,6 @@ void proc_rename(struct Process *proc, const char* name);
        #endif
 #endif
 
-/* OBSOLETE */
-#define CONFIG_KERN_DEFSTACKSIZE CONFIG_PROC_DEFSTACKSIZE
-
 /* Memory fill codes to help debugging */
 #if CONFIG_KERN_MONITOR
        #include <cpu/types.h>
@@ -143,5 +140,5 @@ void proc_rename(struct Process *proc, const char* name);
                #error No cpustack_t size supported!
        #endif
 #endif
-#endif /* KERN_PROC_H */
 
+#endif /* KERN_PROC_H */