1
10
13
14
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
101
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
...
...
#define TX_SOURCE_CODE
#include "tx_api.h"
#include "tx_thread.h"
#if defined(TX_ENABLE_STACK_CHECKING) || defined(TX_PORT_THREAD_STACK_ERROR_HANDLING)
#include "tx_trace.h"
#endif
...
...
UINT _tx_thread_stack_error_notify(VOID (*stack_error_handler)(TX_THREAD *thread_ptr))
{
#if !defined(TX_ENABLE_STACK_CHECKING) && !defined(TX_PORT_THREAD_STACK_ERROR_HANDLING)
UINT status;
if (stack_error_handler != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}if (stack_error_handler != TX_NULL) { ... }
else
{
status = TX_FEATURE_NOT_ENABLED;
}else { ... }
return(status);
/* ... */
#else
TX_INTERRUPT_SAVE_AREA
TX_DISABLE
TX_TRACE_IN_LINE_INSERT(TX_TRACE_THREAD_STACK_ERROR_NOTIFY, 0, 0, 0, 0, TX_TRACE_THREAD_EVENTS)
TX_EL_THREAD_STACK_ERROR_NOTIFY_INSERT
_tx_thread_application_stack_error_handler = stack_error_handler;
TX_RESTORE
return(TX_SUCCESS);/* ... */
#endif
}{ ... }