+#ifndef CONFIG_KERN_MINSTACKSIZE
+ /* For backward compatibility */
+ #define CONFIG_KERN_MINSTACKSIZE KERN_MINSTACKSIZE
+#else
+ #warning FIXME: This macro is deprecated, use KERN_MINSTACKSIZE instead
+#endif
+
+/**
+ * Utility macro to allocate a stack of size \a size.
+ *
+ * This macro define a static stack for one process and do
+ * check if given stack size is enough to run process.
+ * \note If you plan to use kprintf() and similar functions, you will need
+ * at least KERN_MINSTACKSIZE * 2 bytes.
+ *
+ * \param name Variable name for the stack.
+ * \param size Stack size in bytes. It must be at least KERN_MINSTACKSIZE.
+ */
+#define PROC_DEFINE_STACK(name, size) \
+ STATIC_ASSERT((size) >= KERN_MINSTACKSIZE); \
+ cpu_stack_t name[((size) + sizeof(cpu_stack_t) - 1) / sizeof(cpu_stack_t)];
+