summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/task.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index 47bbbee1e9..bd5736a3ae 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -109,6 +109,10 @@ static const struct {
/* Contexts for all tasks */
static task_ tasks[TASK_ID_COUNT];
+/* Sanity checks about static task invariants */
+BUILD_ASSERT(TASK_ID_COUNT <= sizeof(unsigned) * 8);
+BUILD_ASSERT(TASK_ID_COUNT < (1 << (sizeof(task_id_t) * 8)));
+
/* Stacks for all tasks */
#define TASK(n, r, d, s) + s
@@ -613,10 +617,6 @@ void task_pre_init(void)
((task_ *)scratchpad)->stack = (uint32_t *)scratchpad;
*(uint32_t *)scratchpad = STACK_UNUSED_VALUE;
- /* Sanity checks about static task invariants */
- BUILD_ASSERT(TASK_ID_COUNT <= sizeof(unsigned) * 8);
- BUILD_ASSERT(TASK_ID_COUNT < (1 << (sizeof(task_id_t) * 8)));
-
/* Initialize IRQs */
__nvic_init_irqs();
}