summaryrefslogtreecommitdiff
path: root/firmware/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/thread.c')
-rw-r--r--firmware/thread.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/thread.c b/firmware/thread.c
index ce9252ccc6..b687144f4f 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -39,6 +39,7 @@
39#ifdef RB_PROFILE 39#ifdef RB_PROFILE
40#include <profile.h> 40#include <profile.h>
41#endif 41#endif
42#include "core_alloc.h"
42#include "gcc_extensions.h" 43#include "gcc_extensions.h"
43 44
44/**************************************************************************** 45/****************************************************************************
@@ -1161,6 +1162,11 @@ void switch_thread(void)
1161 * to this call. */ 1162 * to this call. */
1162 store_context(&thread->context); 1163 store_context(&thread->context);
1163 1164
1165#ifdef DEBUG
1166 /* Check core_ctx buflib integrity */
1167 core_check_valid();
1168#endif
1169
1164 /* Check if the current thread stack is overflown */ 1170 /* Check if the current thread stack is overflown */
1165 if (UNLIKELY(thread->stack[0] != DEADBEEF) && thread->stack_size > 0) 1171 if (UNLIKELY(thread->stack[0] != DEADBEEF) && thread->stack_size > 0)
1166 thread_stkov(thread); 1172 thread_stkov(thread);