aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chthreads.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-07 09:00:12 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-07 09:00:12 +0000
commit075ff711f1c9cf031fa4708c6b704f120d9a509d (patch)
tree534cedaa24e11fe2149e781cfe577ef0323a9ed8 /os/kernel/src/chthreads.c
parent0c276798fd9ed7c2d91abd54d8fb2f3a20147130 (diff)
downloadChibiOS-075ff711f1c9cf031fa4708c6b704f120d9a509d.tar.gz
ChibiOS-075ff711f1c9cf031fa4708c6b704f120d9a509d.tar.bz2
ChibiOS-075ff711f1c9cf031fa4708c6b704f120d9a509d.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3192 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chthreads.c')
-rw-r--r--os/kernel/src/chthreads.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c
index b68263a7b..182de7673 100644
--- a/os/kernel/src/chthreads.c
+++ b/os/kernel/src/chthreads.c
@@ -99,6 +99,9 @@ Thread *_thread_init(Thread *tp, tprio_t prio) {
#if CH_USE_MESSAGES
queue_init(&tp->p_msgqueue);
#endif
+#if CH_DBG_ENABLE_STACK_CHECK
+ tp->p_stklimit = (stkalign_t *)(tp + 1);
+#endif
#if defined(THREAD_EXT_INIT_HOOK)
THREAD_EXT_INIT_HOOK(tp);
#endif