kernel/os: Allow stacks without "static"
This commit introduces a new macro: OS_TASK_STACK_DEFINE_NOSTATIC. This
macro defines a task stack, but without a leading "static" and trailing
";".
This macro is needed to to create an array of stacks.
extern "C" {
#endif
+#define OS_TASK_STACK_DEFINE_NOSTATIC(__name, __size) \
+ os_stack_t __name [OS_STACK_ALIGN(__size)] \
+ __attribute__((aligned(OS_STACK_ALIGNMENT)))
+
#define OS_TASK_STACK_DEFINE(__name, __size) \
- static os_stack_t __name [OS_STACK_ALIGN(__size)] \
- __attribute__((aligned(OS_STACK_ALIGNMENT)));
+ static OS_TASK_STACK_DEFINE_NOSTATIC(__name, __size);
/** Highest priority task */
#define OS_TASK_PRI_HIGHEST (0)
