RTEMS CPU Kit with SuperCore  4.11.3
internal.h
1 /*
2  * @file rtems/internal.h
3  *
4  * @defgroup libmisc_internal Internal Stack Checker Information
5  *
6  * @ingroup libmisc
7  * @brief Stack Checker Internal Information
8  *
9  * This include file contains internal information
10  * for the RTEMS stack checker.
11  */
12 
13 /*
14  * COPYRIGHT (c) 1989-2006.
15  * On-Line Applications Research Corporation (OAR).
16  *
17  * The license and distribution terms for this file may be
18  * found in the file LICENSE in this distribution or at
19  * http://www.rtems.org/license/LICENSE.
20  */
21 
22 #ifndef __INTERNAL_STACK_CHECK_h
23 #define __INTERNAL_STACK_CHECK_h
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 /*
30  * This structure is used to fill in and compare the "end of stack"
31  * marker pattern.
32  * pattern area must be a multiple of 4 words.
33  */
34 
35 #ifdef CPU_STACK_CHECK_SIZE
36 #define PATTERN_SIZE_WORDS (((CPU_STACK_CHECK_SIZE / 4) + 3) & ~0x3)
37 #else
38 #define PATTERN_SIZE_WORDS (4)
39 #endif
40 
41 #define PATTERN_SIZE_BYTES (PATTERN_SIZE_WORDS * sizeof(uint32_t))
42 
43 typedef struct {
44  uint32_t pattern[ PATTERN_SIZE_WORDS ];
46 
47 /*
48  * The pattern used to fill the entire stack.
49  */
50 
51 #define BYTE_PATTERN 0xA5
52 #define U32_PATTERN 0xA5A5A5A5
53 
54 /*
55  * rtems_stack_checker_create_extension
56  */
57 
59  Thread_Control *running,
60  Thread_Control *the_thread
61 );
62 
63 /*
64  * rtems_stack_checker_begin_extension
65  */
66 
68  Thread_Control *the_thread
69 );
70 
71 /*
72  * rtems_stack_checker_switch_extension
73  */
74 
76  Thread_Control *running,
77  Thread_Control *heir
78 );
79 
80 /*
81  * rtems_stack_checker_fatal_extension
82  */
83 
84 void rtems_stack_checker_fatal_extension(
86  bool is_internal,
87  uint32_t status
88 );
89 
90 /*
91  * rtems_stack_checker_report_usage
92  */
93 
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif
101 /* end of include file */
void rtems_stack_checker_switch_extension(Thread_Control *running, Thread_Control *heir)
Stack Checker Task Context Switch Extension.
Definition: check.c:278
bool rtems_stack_checker_create_extension(Thread_Control *running, Thread_Control *the_thread)
Stack Checker Task Create Extension.
Definition: check.c:184
void rtems_stack_checker_report_usage(void)
Print the stack usage report using printk.
Definition: check.c:519
void rtems_stack_checker_begin_extension(Thread_Control *the_thread)
Stack Checker Task Begin Extension.
Definition: check.c:200
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
Definition: internal.h:43
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:45