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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
122
123
124
129
130
131
136
137
138
143
144
145
150
151
152
157
158
159
164
165
166
171
172
173
178
179
180
185
186
187
192
193
194
199
200
201
202
203
204
205
206
207
208
209
210
211
212
218
224
230
236
242
248
254
260
266
272
278
284
285
286
287
288
289
...
...
...
#define TX_SOURCE_CODE
#include "tx_api.h"
#include "tx_thread.h"
#ifdef TX_THREAD_ENABLE_PERFORMANCE_INFO
#include "tx_trace.h"
#endif
...
...
UINT _tx_thread_performance_system_info_get(ULONG *resumptions, ULONG *suspensions,
ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions,
ULONG *time_slices, ULONG *relinquishes, ULONG *timeouts, ULONG *wait_aborts,
ULONG *non_idle_returns, ULONG *idle_returns)
{
#ifdef TX_THREAD_ENABLE_PERFORMANCE_INFO
TX_INTERRUPT_SAVE_AREA
TX_DISABLE
TX_TRACE_IN_LINE_INSERT(TX_TRACE_THREAD_PERFORMANCE_SYSTEM_INFO_GET, 0, 0, 0, 0, TX_TRACE_THREAD_EVENTS)
TX_EL_THREAD_PERFORMANCE_SYSTEM_INFO_GET_INSERT
/* ... */
if (resumptions != TX_NULL)
{
*resumptions = _tx_thread_performance_resume_count;
}if (resumptions != TX_NULL) { ... }
if (suspensions != TX_NULL)
{
*suspensions = _tx_thread_performance_suspend_count;
}if (suspensions != TX_NULL) { ... }
if (solicited_preemptions != TX_NULL)
{
*solicited_preemptions = _tx_thread_performance_solicited_preemption_count;
}if (solicited_preemptions != TX_NULL) { ... }
if (interrupt_preemptions != TX_NULL)
{
*interrupt_preemptions = _tx_thread_performance_interrupt_preemption_count;
}if (interrupt_preemptions != TX_NULL) { ... }
if (priority_inversions != TX_NULL)
{
*priority_inversions = _tx_thread_performance_priority_inversion_count;
}if (priority_inversions != TX_NULL) { ... }
if (time_slices != TX_NULL)
{
*time_slices = _tx_thread_performance_time_slice_count;
}if (time_slices != TX_NULL) { ... }
if (relinquishes != TX_NULL)
{
*relinquishes = _tx_thread_performance_relinquish_count;
}if (relinquishes != TX_NULL) { ... }
if (timeouts != TX_NULL)
{
*timeouts = _tx_thread_performance_timeout_count;
}if (timeouts != TX_NULL) { ... }
if (wait_aborts != TX_NULL)
{
*wait_aborts = _tx_thread_performance_wait_abort_count;
}if (wait_aborts != TX_NULL) { ... }
if (non_idle_returns != TX_NULL)
{
*non_idle_returns = _tx_thread_performance_non_idle_return_count;
}if (non_idle_returns != TX_NULL) { ... }
if (idle_returns != TX_NULL)
{
*idle_returns = _tx_thread_performance_idle_return_count;
}if (idle_returns != TX_NULL) { ... }
TX_RESTORE
return(TX_SUCCESS);
/* ... */
#else
UINT status;
if (resumptions != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}if (resumptions != TX_NULL) { ... }
else if (suspensions != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (suspensions != TX_NULL) { ... }
else if (solicited_preemptions != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (solicited_preemptions != TX_NULL) { ... }
else if (interrupt_preemptions != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (interrupt_preemptions != TX_NULL) { ... }
else if (priority_inversions != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (priority_inversions != TX_NULL) { ... }
else if (time_slices != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (time_slices != TX_NULL) { ... }
else if (relinquishes != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (relinquishes != TX_NULL) { ... }
else if (timeouts != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (timeouts != TX_NULL) { ... }
else if (wait_aborts != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (wait_aborts != TX_NULL) { ... }
else if (non_idle_returns != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (non_idle_returns != TX_NULL) { ... }
else if (idle_returns != TX_NULL)
{
status = TX_FEATURE_NOT_ENABLED;
}else if (idle_returns != TX_NULL) { ... }
else
{
status = TX_FEATURE_NOT_ENABLED;
}else { ... }
return(status);/* ... */
#endif
}{ ... }