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
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
121
122
123
124
125
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
...
...
...
#define TX_SOURCE_CODE
#include "tx_api.h"
#include "tx_thread.h"
#include "tx_timer.h"
#include "txm_module.h"
...
...
VOID _txm_module_manager_timer_notify_trampoline(ULONG id)
{
TX_INTERRUPT_SAVE_AREA
TXM_MODULE_INSTANCE *module_instance;
TXM_MODULE_CALLBACK_MESSAGE callback_message;
TX_QUEUE *module_callback_queue;
TX_TIMER *timer_ptr;
CHAR *internal_ptr;
TX_DISABLE
/* ... */
internal_ptr = (CHAR *) _tx_timer_expired_timer_ptr;
TX_USER_TIMER_POINTER_GET((TX_TIMER_INTERNAL *) internal_ptr, timer_ptr);
module_instance = (TXM_MODULE_INSTANCE *) timer_ptr -> tx_timer_module_instance;
if ((module_instance) && (module_instance -> txm_module_instance_id == TXM_MODULE_ID) &&
(module_instance -> txm_module_instance_state == TXM_MODULE_STARTED))
{
module_callback_queue = &(module_instance -> txm_module_instance_callback_request_queue);
callback_message.txm_module_callback_message_type = TXM_TIMER_CALLBACK;
callback_message.txm_module_callback_message_activation_count = 1;
callback_message.txm_module_callback_message_application_function = (VOID (*)(VOID)) timer_ptr -> tx_timer_module_expiration_function;
callback_message.txm_module_callback_message_param_1 = (ULONG) id;
callback_message.txm_module_callback_message_param_2 = 0;
callback_message.txm_module_callback_message_param_3 = 0;
callback_message.txm_module_callback_message_param_4 = 0;
callback_message.txm_module_callback_message_param_5 = 0;
callback_message.txm_module_callback_message_param_6 = 0;
callback_message.txm_module_callback_message_param_7 = 0;
callback_message.txm_module_callback_message_param_8 = 0;
callback_message.txm_module_callback_message_reserved1 = 0;
callback_message.txm_module_callback_message_reserved2 = 0;
TX_RESTORE
/* ... */
_txm_module_manager_callback_request(module_callback_queue, &callback_message);
}if ((module_instance) && (module_instance -> txm_module_instance_id == TXM_MODULE_ID) && (module_instance -> txm_module_instance_state == TXM_MODULE_STARTED)) { ... }
else
{
_txm_module_manager_callback_error_count++;
TX_RESTORE
}else { ... }
}{ ... }