RTEMS
5.0.0
|
Stack Overflow Check User Extension SetNOTE: This extension set automatically determines at initialization time whether the stack for this CPU grows up or down and installs the correct extension routines for that direction. More...
#include <rtems.h>
#include <inttypes.h>
#include <string.h>
#include <stdlib.h>
#include <rtems/bspIo.h>
#include <rtems/printer.h>
#include <rtems/stackchk.h>
#include <rtems/sysinit.h>
#include <rtems/score/address.h>
#include <rtems/score/percpu.h>
#include <rtems/score/smp.h>
#include <rtems/score/threadimpl.h>
Macros | |
#define | CPU_STACK_CHECK_PATTERN_INITIALIZER |
#define | BYTE_PATTERN 0xA5 |
#define | U32_PATTERN 0xA5A5A5A5 |
#define | SANITY_PATTERN_SIZE_BYTES sizeof(Stack_check_Sanity_pattern) |
#define | SANITY_PATTERN_SIZE_WORDS RTEMS_ARRAY_SIZE(Stack_check_Sanity_pattern) |
#define | Stack_check_Get_pattern(_the_stack) |
#define | Stack_check_Calculate_used(_low, _size, _high_water) ((char *)(_high_water) - (char *)(_low)) |
#define | Stack_check_Usable_stack_start(_the_stack) ((_the_stack)->area) |
#define | Stack_check_Usable_stack_size(_the_stack) ((_the_stack)->size - SANITY_PATTERN_SIZE_BYTES) |
Functions | |
bool | rtems_stack_checker_create_extension (Thread_Control *running RTEMS_UNUSED, Thread_Control *the_thread) |
void | rtems_stack_checker_begin_extension (Thread_Control *executing) |
void | rtems_stack_checker_switch_extension (Thread_Control *running RTEMS_UNUSED, Thread_Control *heir RTEMS_UNUSED) |
bool | rtems_stack_checker_is_blown (void) |
Checks if current task is blown its stack. More... | |
void | rtems_stack_checker_report_usage_with_plugin (const rtems_printer *printer) |
Print the stack usage report using caller's routine. More... | |
void | rtems_stack_checker_report_usage (void) |
Print the stack usage report using printk. More... | |
RTEMS_SYSINIT_ITEM (Stack_check_Prepare_interrupt_stacks, RTEMS_SYSINIT_BSP_WORK_AREAS, RTEMS_SYSINIT_ORDER_SECOND) | |
Stack Overflow Check User Extension Set
NOTE: This extension set automatically determines at initialization time whether the stack for this CPU grows up or down and installs the correct extension routines for that direction.
#define CPU_STACK_CHECK_PATTERN_INITIALIZER |