summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/stackchk.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-20 12:03:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-20 12:07:08 +0200
commitc47ad8edc6cd7a02e1cad3f185e60f62a182f686 (patch)
tree28035472b90c1a357ec98b8a1335dd79c6bf936a /cpukit/include/rtems/stackchk.h
parentstackchk: Refactor Stack_check_Dump_threads_usage (diff)
downloadrtems-c47ad8edc6cd7a02e1cad3f185e60f62a182f686.tar.bz2
stackchk: Add SMP support
Check the interrupt stacks of all processors. Set up the interrupt stack of the current processor for high water testing in the thread begin extension. This must be done after multi-threading started, since the initialization stacks may reuse the interrupt stacks. Disable thread dispatching in SMP configurations to prevent thread migration. Writing to the interrupt stack is only safe if done from the corresponding processor in thread context. Update #3459.
Diffstat (limited to 'cpukit/include/rtems/stackchk.h')
-rw-r--r--cpukit/include/rtems/stackchk.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/include/rtems/stackchk.h b/cpukit/include/rtems/stackchk.h
index eb81bb827e..b7d906ec22 100644
--- a/cpukit/include/rtems/stackchk.h
+++ b/cpukit/include/rtems/stackchk.h
@@ -96,6 +96,8 @@ bool rtems_stack_checker_create_extension(
Thread_Control *the_thread
);
+void rtems_stack_checker_begin_extension( Thread_Control *executing );
+
/**
* @brief Stack Checker Task Context Switch Extension
*
@@ -125,7 +127,7 @@ void rtems_stack_checker_switch_extension(
0, /* rtems_task_restart */ \
0, /* rtems_task_delete */ \
rtems_stack_checker_switch_extension, /* task_switch */ \
- 0, /* task_begin */ \
+ rtems_stack_checker_begin_extension, /* task_begin */ \
0, /* task_exitted */ \
0, /* fatal */ \
0 /* terminate */ \