1 /**************************************************************************/
2 /* */
3 /* Copyright (c) Microsoft Corporation. All rights reserved. */
4 /* */
5 /* This software is licensed under the Microsoft Software License */
6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */
7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
8 /* and in the root directory of this software. */
9 /* */
10 /**************************************************************************/
11
12
13 /**************************************************************************/
14 /**************************************************************************/
15 /** */
16 /** ThreadX Component */
17 /** */
18 /** Module Manager */
19 /** */
20 /**************************************************************************/
21 /**************************************************************************/
22
23 #ifndef TXM_BLOCK_ALLOCATE_CALL_NOT_USED
24 /* UINT _txe_block_allocate(
25 TX_BLOCK_POOL *pool_ptr, -> param_0
26 VOID **block_ptr, -> param_1
27 ULONG wait_option -> param_2
28 ); */
_txm_module_manager_tx_block_allocate_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)29 static ALIGN_TYPE _txm_module_manager_tx_block_allocate_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
30 {
31
32 ALIGN_TYPE return_value;
33
34 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
35 {
36 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL)))
37 return(TXM_MODULE_INVALID_MEMORY);
38
39 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(VOID *)))
40 return(TXM_MODULE_INVALID_MEMORY);
41 }
42
43 return_value = (ALIGN_TYPE) _txe_block_allocate(
44 (TX_BLOCK_POOL *) param_0,
45 (VOID **) param_1,
46 (ULONG) param_2
47 );
48 return(return_value);
49 }
50 #endif
51
52 #ifndef TXM_BLOCK_POOL_CREATE_CALL_NOT_USED
53 /* UINT _txe_block_pool_create(
54 TX_BLOCK_POOL *pool_ptr, -> param_0
55 CHAR *name_ptr, -> param_1
56 ULONG block_size, -> extra_parameters[0]
57 VOID *pool_start, -> extra_parameters[1]
58 ULONG pool_size, -> extra_parameters[2]
59 UINT pool_control_block_size -> extra_parameters[3]
60 ); */
_txm_module_manager_tx_block_pool_create_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)61 static ALIGN_TYPE _txm_module_manager_tx_block_pool_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
62 {
63
64 ALIGN_TYPE return_value;
65
66 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
67 {
68 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, param_0, sizeof(TX_BLOCK_POOL)))
69 return(TXM_MODULE_INVALID_MEMORY);
70
71 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
72 return(TXM_MODULE_INVALID_MEMORY);
73
74 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2])))
75 return(TXM_MODULE_INVALID_MEMORY);
76
77 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], extra_parameters[2]))
78 return(TXM_MODULE_INVALID_MEMORY);
79 }
80
81 return_value = (ALIGN_TYPE) _txe_block_pool_create(
82 (TX_BLOCK_POOL *) param_0,
83 (CHAR *) param_1,
84 (ULONG) extra_parameters[0],
85 (VOID *) extra_parameters[1],
86 (ULONG) extra_parameters[2],
87 (UINT) extra_parameters[3]
88 );
89 return(return_value);
90 }
91 #endif
92
93 #ifndef TXM_BLOCK_POOL_DELETE_CALL_NOT_USED
94 /* UINT _txe_block_pool_delete(
95 TX_BLOCK_POOL *pool_ptr -> param_0
96 ); */
_txm_module_manager_tx_block_pool_delete_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)97 static ALIGN_TYPE _txm_module_manager_tx_block_pool_delete_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
98 {
99
100 ALIGN_TYPE return_value;
101
102 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
103 {
104 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL)))
105 return(TXM_MODULE_INVALID_MEMORY);
106 }
107
108 return_value = (ALIGN_TYPE) _txe_block_pool_delete(
109 (TX_BLOCK_POOL *) param_0
110 );
111
112 /* Deallocate object memory. */
113 if (return_value == TX_SUCCESS)
114 {
115 return_value = _txm_module_manager_object_deallocate((VOID *) param_0);
116 }
117 return(return_value);
118 }
119 #endif
120
121 #ifndef TXM_BLOCK_POOL_INFO_GET_CALL_NOT_USED
122 /* UINT _txe_block_pool_info_get(
123 TX_BLOCK_POOL *pool_ptr, -> param_0
124 CHAR **name, -> param_1
125 ULONG *available_blocks, -> extra_parameters[0]
126 ULONG *total_blocks, -> extra_parameters[1]
127 TX_THREAD **first_suspended, -> extra_parameters[2]
128 ULONG *suspended_count, -> extra_parameters[3]
129 TX_BLOCK_POOL **next_pool -> extra_parameters[4]
130 ); */
_txm_module_manager_tx_block_pool_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)131 static ALIGN_TYPE _txm_module_manager_tx_block_pool_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
132 {
133
134 ALIGN_TYPE return_value;
135
136 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
137 {
138 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL)))
139 return(TXM_MODULE_INVALID_MEMORY);
140
141 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *)))
142 return(TXM_MODULE_INVALID_MEMORY);
143
144 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[5])))
145 return(TXM_MODULE_INVALID_MEMORY);
146
147 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
148 return(TXM_MODULE_INVALID_MEMORY);
149
150 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
151 return(TXM_MODULE_INVALID_MEMORY);
152
153 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(TX_THREAD *)))
154 return(TXM_MODULE_INVALID_MEMORY);
155
156 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
157 return(TXM_MODULE_INVALID_MEMORY);
158
159 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(TX_BLOCK_POOL *)))
160 return(TXM_MODULE_INVALID_MEMORY);
161 }
162
163 return_value = (ALIGN_TYPE) _txe_block_pool_info_get(
164 (TX_BLOCK_POOL *) param_0,
165 (CHAR **) param_1,
166 (ULONG *) extra_parameters[0],
167 (ULONG *) extra_parameters[1],
168 (TX_THREAD **) extra_parameters[2],
169 (ULONG *) extra_parameters[3],
170 (TX_BLOCK_POOL **) extra_parameters[4]
171 );
172 return(return_value);
173 }
174 #endif
175
176 #ifndef TXM_BLOCK_POOL_PERFORMANCE_INFO_GET_CALL_NOT_USED
177 /* UINT _tx_block_pool_performance_info_get(
178 TX_BLOCK_POOL *pool_ptr, -> param_0
179 ULONG *allocates, -> param_1
180 ULONG *releases, -> extra_parameters[0]
181 ULONG *suspensions, -> extra_parameters[1]
182 ULONG *timeouts -> extra_parameters[2]
183 ); */
_txm_module_manager_tx_block_pool_performance_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)184 static ALIGN_TYPE _txm_module_manager_tx_block_pool_performance_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
185 {
186
187 ALIGN_TYPE return_value;
188
189 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
190 {
191 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL)))
192 return(TXM_MODULE_INVALID_MEMORY);
193
194 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
195 return(TXM_MODULE_INVALID_MEMORY);
196
197 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[3])))
198 return(TXM_MODULE_INVALID_MEMORY);
199
200 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
201 return(TXM_MODULE_INVALID_MEMORY);
202
203 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
204 return(TXM_MODULE_INVALID_MEMORY);
205
206 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
207 return(TXM_MODULE_INVALID_MEMORY);
208 }
209
210 return_value = (ALIGN_TYPE) _tx_block_pool_performance_info_get(
211 (TX_BLOCK_POOL *) param_0,
212 (ULONG *) param_1,
213 (ULONG *) extra_parameters[0],
214 (ULONG *) extra_parameters[1],
215 (ULONG *) extra_parameters[2]
216 );
217 return(return_value);
218 }
219 #endif
220
221 #ifndef TXM_BLOCK_POOL_PERFORMANCE_SYSTEM_INFO_GET_CALL_NOT_USED
222 /* UINT _tx_block_pool_performance_system_info_get(
223 ULONG *allocates, -> param_0
224 ULONG *releases, -> param_1
225 ULONG *suspensions, -> extra_parameters[0]
226 ULONG *timeouts -> extra_parameters[1]
227 ); */
_txm_module_manager_tx_block_pool_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)228 static ALIGN_TYPE _txm_module_manager_tx_block_pool_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
229 {
230
231 ALIGN_TYPE return_value;
232
233 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
234 {
235 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_0, sizeof(ULONG)))
236 return(TXM_MODULE_INVALID_MEMORY);
237
238 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
239 return(TXM_MODULE_INVALID_MEMORY);
240
241 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2])))
242 return(TXM_MODULE_INVALID_MEMORY);
243
244 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
245 return(TXM_MODULE_INVALID_MEMORY);
246
247 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
248 return(TXM_MODULE_INVALID_MEMORY);
249 }
250
251 return_value = (ALIGN_TYPE) _tx_block_pool_performance_system_info_get(
252 (ULONG *) param_0,
253 (ULONG *) param_1,
254 (ULONG *) extra_parameters[0],
255 (ULONG *) extra_parameters[1]
256 );
257 return(return_value);
258 }
259 #endif
260
261 #ifndef TXM_BLOCK_POOL_PRIORITIZE_CALL_NOT_USED
262 /* UINT _txe_block_pool_prioritize(
263 TX_BLOCK_POOL *pool_ptr -> param_0
264 ); */
_txm_module_manager_tx_block_pool_prioritize_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)265 static ALIGN_TYPE _txm_module_manager_tx_block_pool_prioritize_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
266 {
267
268 ALIGN_TYPE return_value;
269
270 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
271 {
272 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL)))
273 return(TXM_MODULE_INVALID_MEMORY);
274 }
275
276 return_value = (ALIGN_TYPE) _txe_block_pool_prioritize(
277 (TX_BLOCK_POOL *) param_0
278 );
279 return(return_value);
280 }
281 #endif
282
283 #ifndef TXM_BLOCK_RELEASE_CALL_NOT_USED
284 /* UINT _txe_block_release(
285 VOID *block_ptr -> param_0
286 ); */
_txm_module_manager_tx_block_release_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)287 static ALIGN_TYPE _txm_module_manager_tx_block_release_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
288 {
289
290 ALIGN_TYPE return_value;
291 ALIGN_TYPE block_header_start;
292
293 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
294 {
295 /* Is the pointer non-null? */
296 if ((void *) param_0 != TX_NULL)
297 {
298
299 /* Calculate the beginning of the header info for this block (the header
300 consists of 1 pointers. */
301 block_header_start = param_0 - sizeof(ALIGN_TYPE);
302
303 if (/* Did we underflow when doing the subtract? */
304 (block_header_start > param_0) ||
305 /* Ensure the pointer is inside the module's data. Note that we only
306 check the pointer in the header because only that pointer is
307 dereferenced during the pointer's validity check in _tx_block_release. */
308 (!TXM_MODULE_MANAGER_CHECK_INSIDE_DATA(module_instance, block_header_start, sizeof(ALIGN_TYPE))))
309 {
310
311 /* Invalid pointer. */
312 return(TXM_MODULE_INVALID_MEMORY);
313 }
314 }
315 }
316
317 return_value = (ALIGN_TYPE) _txe_block_release(
318 (VOID *) param_0
319 );
320 return(return_value);
321 }
322 #endif
323
324 #ifndef TXM_BYTE_ALLOCATE_CALL_NOT_USED
325 /* UINT _txe_byte_allocate(
326 TX_BYTE_POOL *pool_ptr, -> param_0
327 VOID **memory_ptr, -> param_1
328 ULONG memory_size, -> extra_parameters[0]
329 ULONG wait_option -> extra_parameters[1]
330 ); */
_txm_module_manager_tx_byte_allocate_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)331 static ALIGN_TYPE _txm_module_manager_tx_byte_allocate_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
332 {
333
334 ALIGN_TYPE return_value;
335
336 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
337 {
338 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL)))
339 return(TXM_MODULE_INVALID_MEMORY);
340
341 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(VOID *)))
342 return(TXM_MODULE_INVALID_MEMORY);
343
344 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2])))
345 return(TXM_MODULE_INVALID_MEMORY);
346 }
347
348 return_value = (ALIGN_TYPE) _txe_byte_allocate(
349 (TX_BYTE_POOL *) param_0,
350 (VOID **) param_1,
351 (ULONG) extra_parameters[0],
352 (ULONG) extra_parameters[1]
353 );
354 return(return_value);
355 }
356 #endif
357
358 #ifndef TXM_BYTE_POOL_CREATE_CALL_NOT_USED
359 /* UINT _txe_byte_pool_create(
360 TX_BYTE_POOL *pool_ptr, -> param_0
361 CHAR *name_ptr, -> param_1
362 VOID *pool_start, -> extra_parameters[0]
363 ULONG pool_size, -> extra_parameters[1]
364 UINT pool_control_block_size -> extra_parameters[2]
365 ); */
_txm_module_manager_tx_byte_pool_create_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)366 static ALIGN_TYPE _txm_module_manager_tx_byte_pool_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
367 {
368
369 ALIGN_TYPE return_value;
370
371 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
372 {
373 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, param_0, sizeof(TX_BYTE_POOL)))
374 return(TXM_MODULE_INVALID_MEMORY);
375
376 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
377 return(TXM_MODULE_INVALID_MEMORY);
378
379 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[3])))
380 return(TXM_MODULE_INVALID_MEMORY);
381
382 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], extra_parameters[1]))
383 return(TXM_MODULE_INVALID_MEMORY);
384 }
385
386 return_value = (ALIGN_TYPE) _txe_byte_pool_create(
387 (TX_BYTE_POOL *) param_0,
388 (CHAR *) param_1,
389 (VOID *) extra_parameters[0],
390 (ULONG) extra_parameters[1],
391 (UINT) extra_parameters[2]
392 );
393 return(return_value);
394 }
395 #endif
396
397 #ifndef TXM_BYTE_POOL_DELETE_CALL_NOT_USED
398 /* UINT _txe_byte_pool_delete(
399 TX_BYTE_POOL *pool_ptr -> param_0
400 ); */
_txm_module_manager_tx_byte_pool_delete_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)401 static ALIGN_TYPE _txm_module_manager_tx_byte_pool_delete_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
402 {
403
404 ALIGN_TYPE return_value;
405
406 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
407 {
408 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL)))
409 return(TXM_MODULE_INVALID_MEMORY);
410 }
411
412 return_value = (ALIGN_TYPE) _txe_byte_pool_delete(
413 (TX_BYTE_POOL *) param_0
414 );
415
416 /* Deallocate object memory. */
417 if (return_value == TX_SUCCESS)
418 {
419 return_value = _txm_module_manager_object_deallocate((VOID *) param_0);
420 }
421 return(return_value);
422 }
423 #endif
424
425 #ifndef TXM_BYTE_POOL_INFO_GET_CALL_NOT_USED
426 /* UINT _txe_byte_pool_info_get(
427 TX_BYTE_POOL *pool_ptr, -> param_0
428 CHAR **name, -> param_1
429 ULONG *available_bytes, -> extra_parameters[0]
430 ULONG *fragments, -> extra_parameters[1]
431 TX_THREAD **first_suspended, -> extra_parameters[2]
432 ULONG *suspended_count, -> extra_parameters[3]
433 TX_BYTE_POOL **next_pool -> extra_parameters[4]
434 ); */
_txm_module_manager_tx_byte_pool_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)435 static ALIGN_TYPE _txm_module_manager_tx_byte_pool_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
436 {
437
438 ALIGN_TYPE return_value;
439
440 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
441 {
442 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL)))
443 return(TXM_MODULE_INVALID_MEMORY);
444
445 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *)))
446 return(TXM_MODULE_INVALID_MEMORY);
447
448 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[5])))
449 return(TXM_MODULE_INVALID_MEMORY);
450
451 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
452 return(TXM_MODULE_INVALID_MEMORY);
453
454 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
455 return(TXM_MODULE_INVALID_MEMORY);
456
457 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(TX_THREAD *)))
458 return(TXM_MODULE_INVALID_MEMORY);
459
460 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
461 return(TXM_MODULE_INVALID_MEMORY);
462
463 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(TX_BYTE_POOL *)))
464 return(TXM_MODULE_INVALID_MEMORY);
465 }
466
467 return_value = (ALIGN_TYPE) _txe_byte_pool_info_get(
468 (TX_BYTE_POOL *) param_0,
469 (CHAR **) param_1,
470 (ULONG *) extra_parameters[0],
471 (ULONG *) extra_parameters[1],
472 (TX_THREAD **) extra_parameters[2],
473 (ULONG *) extra_parameters[3],
474 (TX_BYTE_POOL **) extra_parameters[4]
475 );
476 return(return_value);
477 }
478 #endif
479
480 #ifndef TXM_BYTE_POOL_PERFORMANCE_INFO_GET_CALL_NOT_USED
481 /* UINT _tx_byte_pool_performance_info_get(
482 TX_BYTE_POOL *pool_ptr, -> param_0
483 ULONG *allocates, -> param_1
484 ULONG *releases, -> extra_parameters[0]
485 ULONG *fragments_searched, -> extra_parameters[1]
486 ULONG *merges, -> extra_parameters[2]
487 ULONG *splits, -> extra_parameters[3]
488 ULONG *suspensions, -> extra_parameters[4]
489 ULONG *timeouts -> extra_parameters[5]
490 ); */
_txm_module_manager_tx_byte_pool_performance_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)491 static ALIGN_TYPE _txm_module_manager_tx_byte_pool_performance_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
492 {
493
494 ALIGN_TYPE return_value;
495
496 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
497 {
498 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL)))
499 return(TXM_MODULE_INVALID_MEMORY);
500
501 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
502 return(TXM_MODULE_INVALID_MEMORY);
503
504 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[6])))
505 return(TXM_MODULE_INVALID_MEMORY);
506
507 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
508 return(TXM_MODULE_INVALID_MEMORY);
509
510 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
511 return(TXM_MODULE_INVALID_MEMORY);
512
513 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
514 return(TXM_MODULE_INVALID_MEMORY);
515
516 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
517 return(TXM_MODULE_INVALID_MEMORY);
518
519 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(ULONG)))
520 return(TXM_MODULE_INVALID_MEMORY);
521
522 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[5], sizeof(ULONG)))
523 return(TXM_MODULE_INVALID_MEMORY);
524 }
525
526 return_value = (ALIGN_TYPE) _tx_byte_pool_performance_info_get(
527 (TX_BYTE_POOL *) param_0,
528 (ULONG *) param_1,
529 (ULONG *) extra_parameters[0],
530 (ULONG *) extra_parameters[1],
531 (ULONG *) extra_parameters[2],
532 (ULONG *) extra_parameters[3],
533 (ULONG *) extra_parameters[4],
534 (ULONG *) extra_parameters[5]
535 );
536 return(return_value);
537 }
538 #endif
539
540 #ifndef TXM_BYTE_POOL_PERFORMANCE_SYSTEM_INFO_GET_CALL_NOT_USED
541 /* UINT _tx_byte_pool_performance_system_info_get(
542 ULONG *allocates, -> param_0
543 ULONG *releases, -> param_1
544 ULONG *fragments_searched, -> extra_parameters[0]
545 ULONG *merges, -> extra_parameters[1]
546 ULONG *splits, -> extra_parameters[2]
547 ULONG *suspensions, -> extra_parameters[3]
548 ULONG *timeouts -> extra_parameters[4]
549 ); */
_txm_module_manager_tx_byte_pool_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)550 static ALIGN_TYPE _txm_module_manager_tx_byte_pool_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
551 {
552
553 ALIGN_TYPE return_value;
554
555 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
556 {
557 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_0, sizeof(ULONG)))
558 return(TXM_MODULE_INVALID_MEMORY);
559
560 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
561 return(TXM_MODULE_INVALID_MEMORY);
562
563 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[5])))
564 return(TXM_MODULE_INVALID_MEMORY);
565
566 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
567 return(TXM_MODULE_INVALID_MEMORY);
568
569 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
570 return(TXM_MODULE_INVALID_MEMORY);
571
572 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
573 return(TXM_MODULE_INVALID_MEMORY);
574
575 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
576 return(TXM_MODULE_INVALID_MEMORY);
577
578 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(ULONG)))
579 return(TXM_MODULE_INVALID_MEMORY);
580 }
581
582 return_value = (ALIGN_TYPE) _tx_byte_pool_performance_system_info_get(
583 (ULONG *) param_0,
584 (ULONG *) param_1,
585 (ULONG *) extra_parameters[0],
586 (ULONG *) extra_parameters[1],
587 (ULONG *) extra_parameters[2],
588 (ULONG *) extra_parameters[3],
589 (ULONG *) extra_parameters[4]
590 );
591 return(return_value);
592 }
593 #endif
594
595 #ifndef TXM_BYTE_POOL_PRIORITIZE_CALL_NOT_USED
596 /* UINT _txe_byte_pool_prioritize(
597 TX_BYTE_POOL *pool_ptr -> param_0
598 ); */
_txm_module_manager_tx_byte_pool_prioritize_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)599 static ALIGN_TYPE _txm_module_manager_tx_byte_pool_prioritize_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
600 {
601
602 ALIGN_TYPE return_value;
603
604 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
605 {
606 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL)))
607 return(TXM_MODULE_INVALID_MEMORY);
608 }
609
610 return_value = (ALIGN_TYPE) _txe_byte_pool_prioritize(
611 (TX_BYTE_POOL *) param_0
612 );
613 return(return_value);
614 }
615 #endif
616
617 #ifndef TXM_BYTE_RELEASE_CALL_NOT_USED
618 /* UINT _txe_byte_release(
619 VOID *memory_ptr -> param_0
620 ); */
_txm_module_manager_tx_byte_release_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)621 static ALIGN_TYPE _txm_module_manager_tx_byte_release_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
622 {
623
624 ALIGN_TYPE return_value;
625 ALIGN_TYPE block_header_start;
626
627 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
628 {
629 /* Is the pointer non-null? */
630 if ((void *) param_0 != TX_NULL)
631 {
632
633 /* Calculate the beginning of the header info for this block (the header
634 consists of 2 pointers). */
635 block_header_start = param_0 - 2*sizeof(ALIGN_TYPE);
636
637 if (/* Did we underflow when doing the subtract? */
638 (block_header_start > param_0) ||
639 /* Ensure the pointer is inside the module's data. Note that we only
640 check the pointers in the header because only those two are
641 dereferenced during the pointer's validity check in _tx_byte_release. */
642 (!TXM_MODULE_MANAGER_CHECK_INSIDE_DATA(module_instance, block_header_start, 2*sizeof(ALIGN_TYPE))))
643 {
644
645 /* Invalid pointer. */
646 return(TXM_MODULE_INVALID_MEMORY);
647 }
648 }
649 }
650
651 return_value = (ALIGN_TYPE) _txe_byte_release(
652 (VOID *) param_0
653 );
654 return(return_value);
655 }
656 #endif
657
658 #ifndef TXM_EVENT_FLAGS_CREATE_CALL_NOT_USED
659 /* UINT _txe_event_flags_create(
660 TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0
661 CHAR *name_ptr, -> param_1
662 UINT event_control_block_size -> param_2
663 ); */
_txm_module_manager_tx_event_flags_create_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)664 static ALIGN_TYPE _txm_module_manager_tx_event_flags_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
665 {
666
667 ALIGN_TYPE return_value;
668
669 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
670 {
671 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP)))
672 return(TXM_MODULE_INVALID_MEMORY);
673
674 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
675 return(TXM_MODULE_INVALID_MEMORY);
676 }
677
678 return_value = (ALIGN_TYPE) _txe_event_flags_create(
679 (TX_EVENT_FLAGS_GROUP *) param_0,
680 (CHAR *) param_1,
681 (UINT) param_2
682 );
683 return(return_value);
684 }
685 #endif
686
687 #ifndef TXM_EVENT_FLAGS_DELETE_CALL_NOT_USED
688 /* UINT _txe_event_flags_delete(
689 TX_EVENT_FLAGS_GROUP *group_ptr -> param_0
690 ); */
_txm_module_manager_tx_event_flags_delete_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)691 static ALIGN_TYPE _txm_module_manager_tx_event_flags_delete_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
692 {
693
694 ALIGN_TYPE return_value;
695
696 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
697 {
698 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP)))
699 return(TXM_MODULE_INVALID_MEMORY);
700 }
701
702 return_value = (ALIGN_TYPE) _txe_event_flags_delete(
703 (TX_EVENT_FLAGS_GROUP *) param_0
704 );
705
706 /* Deallocate object memory. */
707 if (return_value == TX_SUCCESS)
708 {
709 return_value = _txm_module_manager_object_deallocate((VOID *) param_0);
710 }
711 return(return_value);
712 }
713 #endif
714
715 #ifndef TXM_EVENT_FLAGS_GET_CALL_NOT_USED
716 /* UINT _txe_event_flags_get(
717 TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0
718 ULONG requested_flags, -> param_1
719 UINT get_option, -> extra_parameters[0]
720 ULONG *actual_flags_ptr, -> extra_parameters[1]
721 ULONG wait_option -> extra_parameters[2]
722 ); */
_txm_module_manager_tx_event_flags_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)723 static ALIGN_TYPE _txm_module_manager_tx_event_flags_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
724 {
725
726 ALIGN_TYPE return_value;
727
728 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
729 {
730 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP)))
731 return(TXM_MODULE_INVALID_MEMORY);
732
733 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
734 return(TXM_MODULE_INVALID_MEMORY);
735
736 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[3])))
737 return(TXM_MODULE_INVALID_MEMORY);
738 }
739
740 return_value = (ALIGN_TYPE) _txe_event_flags_get(
741 (TX_EVENT_FLAGS_GROUP *) param_0,
742 (ULONG) param_1,
743 (UINT) extra_parameters[0],
744 (ULONG *) extra_parameters[1],
745 (ULONG) extra_parameters[2]
746 );
747 return(return_value);
748 }
749 #endif
750
751 #ifndef TXM_EVENT_FLAGS_INFO_GET_CALL_NOT_USED
752 /* UINT _txe_event_flags_info_get(
753 TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0
754 CHAR **name, -> param_1
755 ULONG *current_flags, -> extra_parameters[0]
756 TX_THREAD **first_suspended, -> extra_parameters[1]
757 ULONG *suspended_count, -> extra_parameters[2]
758 TX_EVENT_FLAGS_GROUP **next_group -> extra_parameters[3]
759 ); */
_txm_module_manager_tx_event_flags_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)760 static ALIGN_TYPE _txm_module_manager_tx_event_flags_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
761 {
762
763 ALIGN_TYPE return_value;
764
765 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
766 {
767 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP)))
768 return(TXM_MODULE_INVALID_MEMORY);
769
770 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *)))
771 return(TXM_MODULE_INVALID_MEMORY);
772
773 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[4])))
774 return(TXM_MODULE_INVALID_MEMORY);
775
776 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
777 return(TXM_MODULE_INVALID_MEMORY);
778
779 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(TX_THREAD *)))
780 return(TXM_MODULE_INVALID_MEMORY);
781
782 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
783 return(TXM_MODULE_INVALID_MEMORY);
784
785 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(TX_EVENT_FLAGS_GROUP *)))
786 return(TXM_MODULE_INVALID_MEMORY);
787 }
788
789 return_value = (ALIGN_TYPE) _txe_event_flags_info_get(
790 (TX_EVENT_FLAGS_GROUP *) param_0,
791 (CHAR **) param_1,
792 (ULONG *) extra_parameters[0],
793 (TX_THREAD **) extra_parameters[1],
794 (ULONG *) extra_parameters[2],
795 (TX_EVENT_FLAGS_GROUP **) extra_parameters[3]
796 );
797 return(return_value);
798 }
799 #endif
800
801 #ifndef TXM_EVENT_FLAGS_PERFORMANCE_INFO_GET_CALL_NOT_USED
802 /* UINT _tx_event_flags_performance_info_get(
803 TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0
804 ULONG *sets, -> param_1
805 ULONG *gets, -> extra_parameters[0]
806 ULONG *suspensions, -> extra_parameters[1]
807 ULONG *timeouts -> extra_parameters[2]
808 ); */
_txm_module_manager_tx_event_flags_performance_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)809 static ALIGN_TYPE _txm_module_manager_tx_event_flags_performance_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
810 {
811
812 ALIGN_TYPE return_value;
813
814 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
815 {
816 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP)))
817 return(TXM_MODULE_INVALID_MEMORY);
818
819 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
820 return(TXM_MODULE_INVALID_MEMORY);
821
822 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[3])))
823 return(TXM_MODULE_INVALID_MEMORY);
824
825 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
826 return(TXM_MODULE_INVALID_MEMORY);
827
828 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
829 return(TXM_MODULE_INVALID_MEMORY);
830
831 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
832 return(TXM_MODULE_INVALID_MEMORY);
833 }
834
835 return_value = (ALIGN_TYPE) _tx_event_flags_performance_info_get(
836 (TX_EVENT_FLAGS_GROUP *) param_0,
837 (ULONG *) param_1,
838 (ULONG *) extra_parameters[0],
839 (ULONG *) extra_parameters[1],
840 (ULONG *) extra_parameters[2]
841 );
842 return(return_value);
843 }
844 #endif
845
846 #ifndef TXM_EVENT_FLAGS_PERFORMANCE_SYSTEM_INFO_GET_CALL_NOT_USED
847 /* UINT _tx_event_flags_performance_system_info_get(
848 ULONG *sets, -> param_0
849 ULONG *gets, -> param_1
850 ULONG *suspensions, -> extra_parameters[0]
851 ULONG *timeouts -> extra_parameters[1]
852 ); */
_txm_module_manager_tx_event_flags_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)853 static ALIGN_TYPE _txm_module_manager_tx_event_flags_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
854 {
855
856 ALIGN_TYPE return_value;
857
858 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
859 {
860 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_0, sizeof(ULONG)))
861 return(TXM_MODULE_INVALID_MEMORY);
862
863 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
864 return(TXM_MODULE_INVALID_MEMORY);
865
866 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2])))
867 return(TXM_MODULE_INVALID_MEMORY);
868
869 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
870 return(TXM_MODULE_INVALID_MEMORY);
871
872 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
873 return(TXM_MODULE_INVALID_MEMORY);
874 }
875
876 return_value = (ALIGN_TYPE) _tx_event_flags_performance_system_info_get(
877 (ULONG *) param_0,
878 (ULONG *) param_1,
879 (ULONG *) extra_parameters[0],
880 (ULONG *) extra_parameters[1]
881 );
882 return(return_value);
883 }
884 #endif
885
886 #ifndef TXM_EVENT_FLAGS_SET_CALL_NOT_USED
887 /* UINT _txe_event_flags_set(
888 TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0
889 ULONG flags_to_set, -> param_1
890 UINT set_option -> param_2
891 ); */
_txm_module_manager_tx_event_flags_set_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)892 static ALIGN_TYPE _txm_module_manager_tx_event_flags_set_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
893 {
894
895 ALIGN_TYPE return_value;
896
897 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
898 {
899 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP)))
900 return(TXM_MODULE_INVALID_MEMORY);
901 }
902
903 return_value = (ALIGN_TYPE) _txe_event_flags_set(
904 (TX_EVENT_FLAGS_GROUP *) param_0,
905 (ULONG) param_1,
906 (UINT) param_2
907 );
908 return(return_value);
909 }
910 #endif
911
912 #ifndef TXM_EVENT_FLAGS_SET_NOTIFY_CALL_NOT_USED
913 /* UINT _txe_event_flags_set_notify(
914 TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0
915 VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *) -> param_1
916 ); */
_txm_module_manager_tx_event_flags_set_notify_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1)917 static ALIGN_TYPE _txm_module_manager_tx_event_flags_set_notify_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1)
918 {
919
920 ALIGN_TYPE return_value;
921 TX_EVENT_FLAGS_GROUP *event_flags_ptr = (TX_EVENT_FLAGS_GROUP *)param_0;
922 VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *);
923
924 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
925 {
926 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP)))
927 return(TXM_MODULE_INVALID_MEMORY);
928
929 /* Since we need to write to the object, ensure it's valid. */
930 if ((event_flags_ptr == TX_NULL) || (event_flags_ptr -> tx_event_flags_group_id != TX_EVENT_FLAGS_ID))
931 return(TX_GROUP_ERROR);
932 }
933
934 /* Is it a disable request? */
935 if ((void *) param_1 == TX_NULL)
936 {
937
938 /* Clear the callback. */
939 events_set_notify = (VOID (*)(TX_EVENT_FLAGS_GROUP *)) TX_NULL;
940 }
941 else
942 {
943
944 /* Setup trampoline values. */
945 event_flags_ptr -> tx_event_flags_group_module_instance = (VOID *) module_instance;
946 event_flags_ptr -> tx_event_flags_group_set_module_notify = (VOID (*)(TX_EVENT_FLAGS_GROUP *)) param_1;
947 events_set_notify = _txm_module_manager_event_flags_notify_trampoline;
948 }
949
950 return_value = (ALIGN_TYPE) _txe_event_flags_set_notify(
951 (TX_EVENT_FLAGS_GROUP *) param_0,
952 (VOID (*)(TX_EVENT_FLAGS_GROUP *)) events_set_notify
953 );
954 return(return_value);
955 }
956 #endif
957
958 #ifndef TXM_MUTEX_CREATE_CALL_NOT_USED
959 /* UINT _txe_mutex_create(
960 TX_MUTEX *mutex_ptr, -> param_0
961 CHAR *name_ptr, -> param_1
962 UINT inherit, -> extra_parameters[0]
963 UINT mutex_control_block_size -> extra_parameters[1]
964 ); */
_txm_module_manager_tx_mutex_create_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)965 static ALIGN_TYPE _txm_module_manager_tx_mutex_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
966 {
967
968 ALIGN_TYPE return_value;
969
970 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
971 {
972 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, param_0, sizeof(TX_MUTEX)))
973 return(TXM_MODULE_INVALID_MEMORY);
974
975 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
976 return(TXM_MODULE_INVALID_MEMORY);
977
978 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2])))
979 return(TXM_MODULE_INVALID_MEMORY);
980 }
981
982 return_value = (ALIGN_TYPE) _txe_mutex_create(
983 (TX_MUTEX *) param_0,
984 (CHAR *) param_1,
985 (UINT) extra_parameters[0],
986 (UINT) extra_parameters[1]
987 );
988 return(return_value);
989 }
990 #endif
991
992 #ifndef TXM_MUTEX_DELETE_CALL_NOT_USED
993 /* UINT _txe_mutex_delete(
994 TX_MUTEX *mutex_ptr -> param_0
995 ); */
_txm_module_manager_tx_mutex_delete_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)996 static ALIGN_TYPE _txm_module_manager_tx_mutex_delete_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
997 {
998
999 ALIGN_TYPE return_value;
1000
1001 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1002 {
1003 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX)))
1004 return(TXM_MODULE_INVALID_MEMORY);
1005 }
1006
1007 return_value = (ALIGN_TYPE) _txe_mutex_delete(
1008 (TX_MUTEX *) param_0
1009 );
1010
1011 /* Deallocate object memory. */
1012 if (return_value == TX_SUCCESS)
1013 {
1014 return_value = _txm_module_manager_object_deallocate((VOID *) param_0);
1015 }
1016 return(return_value);
1017 }
1018 #endif
1019
1020 #ifndef TXM_MUTEX_GET_CALL_NOT_USED
1021 /* UINT _txe_mutex_get(
1022 TX_MUTEX *mutex_ptr, -> param_0
1023 ULONG wait_option -> param_1
1024 ); */
_txm_module_manager_tx_mutex_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1)1025 static ALIGN_TYPE _txm_module_manager_tx_mutex_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1)
1026 {
1027
1028 ALIGN_TYPE return_value;
1029
1030 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1031 {
1032 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX)))
1033 return(TXM_MODULE_INVALID_MEMORY);
1034 }
1035
1036 return_value = (ALIGN_TYPE) _txe_mutex_get(
1037 (TX_MUTEX *) param_0,
1038 (ULONG) param_1
1039 );
1040 return(return_value);
1041 }
1042 #endif
1043
1044 #ifndef TXM_MUTEX_INFO_GET_CALL_NOT_USED
1045 /* UINT _txe_mutex_info_get(
1046 TX_MUTEX *mutex_ptr, -> param_0
1047 CHAR **name, -> param_1
1048 ULONG *count, -> extra_parameters[0]
1049 TX_THREAD **owner, -> extra_parameters[1]
1050 TX_THREAD **first_suspended, -> extra_parameters[2]
1051 ULONG *suspended_count, -> extra_parameters[3]
1052 TX_MUTEX **next_mutex -> extra_parameters[4]
1053 ); */
_txm_module_manager_tx_mutex_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1054 static ALIGN_TYPE _txm_module_manager_tx_mutex_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1055 {
1056
1057 ALIGN_TYPE return_value;
1058
1059 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1060 {
1061 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX)))
1062 return(TXM_MODULE_INVALID_MEMORY);
1063
1064 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *)))
1065 return(TXM_MODULE_INVALID_MEMORY);
1066
1067 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[5])))
1068 return(TXM_MODULE_INVALID_MEMORY);
1069
1070 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
1071 return(TXM_MODULE_INVALID_MEMORY);
1072
1073 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(TX_THREAD *)))
1074 return(TXM_MODULE_INVALID_MEMORY);
1075
1076 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(TX_THREAD *)))
1077 return(TXM_MODULE_INVALID_MEMORY);
1078
1079 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
1080 return(TXM_MODULE_INVALID_MEMORY);
1081
1082 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(TX_MUTEX *)))
1083 return(TXM_MODULE_INVALID_MEMORY);
1084 }
1085
1086 return_value = (ALIGN_TYPE) _txe_mutex_info_get(
1087 (TX_MUTEX *) param_0,
1088 (CHAR **) param_1,
1089 (ULONG *) extra_parameters[0],
1090 (TX_THREAD **) extra_parameters[1],
1091 (TX_THREAD **) extra_parameters[2],
1092 (ULONG *) extra_parameters[3],
1093 (TX_MUTEX **) extra_parameters[4]
1094 );
1095 return(return_value);
1096 }
1097 #endif
1098
1099 #ifndef TXM_MUTEX_PERFORMANCE_INFO_GET_CALL_NOT_USED
1100 /* UINT _tx_mutex_performance_info_get(
1101 TX_MUTEX *mutex_ptr, -> param_0
1102 ULONG *puts, -> param_1
1103 ULONG *gets, -> extra_parameters[0]
1104 ULONG *suspensions, -> extra_parameters[1]
1105 ULONG *timeouts, -> extra_parameters[2]
1106 ULONG *inversions, -> extra_parameters[3]
1107 ULONG *inheritances -> extra_parameters[4]
1108 ); */
_txm_module_manager_tx_mutex_performance_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1109 static ALIGN_TYPE _txm_module_manager_tx_mutex_performance_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1110 {
1111
1112 ALIGN_TYPE return_value;
1113
1114 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1115 {
1116 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX)))
1117 return(TXM_MODULE_INVALID_MEMORY);
1118
1119 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
1120 return(TXM_MODULE_INVALID_MEMORY);
1121
1122 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[5])))
1123 return(TXM_MODULE_INVALID_MEMORY);
1124
1125 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
1126 return(TXM_MODULE_INVALID_MEMORY);
1127
1128 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
1129 return(TXM_MODULE_INVALID_MEMORY);
1130
1131 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
1132 return(TXM_MODULE_INVALID_MEMORY);
1133
1134 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
1135 return(TXM_MODULE_INVALID_MEMORY);
1136
1137 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(ULONG)))
1138 return(TXM_MODULE_INVALID_MEMORY);
1139 }
1140
1141 return_value = (ALIGN_TYPE) _tx_mutex_performance_info_get(
1142 (TX_MUTEX *) param_0,
1143 (ULONG *) param_1,
1144 (ULONG *) extra_parameters[0],
1145 (ULONG *) extra_parameters[1],
1146 (ULONG *) extra_parameters[2],
1147 (ULONG *) extra_parameters[3],
1148 (ULONG *) extra_parameters[4]
1149 );
1150 return(return_value);
1151 }
1152 #endif
1153
1154 #ifndef TXM_MUTEX_PERFORMANCE_SYSTEM_INFO_GET_CALL_NOT_USED
1155 /* UINT _tx_mutex_performance_system_info_get(
1156 ULONG *puts, -> param_0
1157 ULONG *gets, -> param_1
1158 ULONG *suspensions, -> extra_parameters[0]
1159 ULONG *timeouts, -> extra_parameters[1]
1160 ULONG *inversions, -> extra_parameters[2]
1161 ULONG *inheritances -> extra_parameters[3]
1162 ); */
_txm_module_manager_tx_mutex_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1163 static ALIGN_TYPE _txm_module_manager_tx_mutex_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1164 {
1165
1166 ALIGN_TYPE return_value;
1167
1168 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1169 {
1170 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_0, sizeof(ULONG)))
1171 return(TXM_MODULE_INVALID_MEMORY);
1172
1173 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
1174 return(TXM_MODULE_INVALID_MEMORY);
1175
1176 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[4])))
1177 return(TXM_MODULE_INVALID_MEMORY);
1178
1179 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
1180 return(TXM_MODULE_INVALID_MEMORY);
1181
1182 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
1183 return(TXM_MODULE_INVALID_MEMORY);
1184
1185 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
1186 return(TXM_MODULE_INVALID_MEMORY);
1187
1188 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
1189 return(TXM_MODULE_INVALID_MEMORY);
1190 }
1191
1192 return_value = (ALIGN_TYPE) _tx_mutex_performance_system_info_get(
1193 (ULONG *) param_0,
1194 (ULONG *) param_1,
1195 (ULONG *) extra_parameters[0],
1196 (ULONG *) extra_parameters[1],
1197 (ULONG *) extra_parameters[2],
1198 (ULONG *) extra_parameters[3]
1199 );
1200 return(return_value);
1201 }
1202 #endif
1203
1204 #ifndef TXM_MUTEX_PRIORITIZE_CALL_NOT_USED
1205 /* UINT _txe_mutex_prioritize(
1206 TX_MUTEX *mutex_ptr -> param_0
1207 ); */
_txm_module_manager_tx_mutex_prioritize_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)1208 static ALIGN_TYPE _txm_module_manager_tx_mutex_prioritize_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
1209 {
1210
1211 ALIGN_TYPE return_value;
1212
1213 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1214 {
1215 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX)))
1216 return(TXM_MODULE_INVALID_MEMORY);
1217 }
1218
1219 return_value = (ALIGN_TYPE) _txe_mutex_prioritize(
1220 (TX_MUTEX *) param_0
1221 );
1222 return(return_value);
1223 }
1224 #endif
1225
1226 #ifndef TXM_MUTEX_PUT_CALL_NOT_USED
1227 /* UINT _txe_mutex_put(
1228 TX_MUTEX *mutex_ptr -> param_0
1229 ); */
_txm_module_manager_tx_mutex_put_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)1230 static ALIGN_TYPE _txm_module_manager_tx_mutex_put_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
1231 {
1232
1233 ALIGN_TYPE return_value;
1234
1235 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1236 {
1237 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX)))
1238 return(TXM_MODULE_INVALID_MEMORY);
1239 }
1240
1241 return_value = (ALIGN_TYPE) _txe_mutex_put(
1242 (TX_MUTEX *) param_0
1243 );
1244 return(return_value);
1245 }
1246 #endif
1247
1248 #ifndef TXM_QUEUE_CREATE_CALL_NOT_USED
1249 /* UINT _txe_queue_create(
1250 TX_QUEUE *queue_ptr, -> param_0
1251 CHAR *name_ptr, -> param_1
1252 UINT message_size, -> extra_parameters[0]
1253 VOID *queue_start, -> extra_parameters[1]
1254 ULONG queue_size, -> extra_parameters[2]
1255 UINT queue_control_block_size -> extra_parameters[3]
1256 ); */
_txm_module_manager_tx_queue_create_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1257 static ALIGN_TYPE _txm_module_manager_tx_queue_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1258 {
1259
1260 ALIGN_TYPE return_value;
1261
1262 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1263 {
1264 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, param_0, sizeof(TX_QUEUE)))
1265 return(TXM_MODULE_INVALID_MEMORY);
1266
1267 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
1268 return(TXM_MODULE_INVALID_MEMORY);
1269
1270 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[4])))
1271 return(TXM_MODULE_INVALID_MEMORY);
1272
1273 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], extra_parameters[2]))
1274 return(TXM_MODULE_INVALID_MEMORY);
1275 }
1276
1277 return_value = (ALIGN_TYPE) _txe_queue_create(
1278 (TX_QUEUE *) param_0,
1279 (CHAR *) param_1,
1280 (UINT) extra_parameters[0],
1281 (VOID *) extra_parameters[1],
1282 (ULONG) extra_parameters[2],
1283 (UINT) extra_parameters[3]
1284 );
1285 return(return_value);
1286 }
1287 #endif
1288
1289 #ifndef TXM_QUEUE_DELETE_CALL_NOT_USED
1290 /* UINT _txe_queue_delete(
1291 TX_QUEUE *queue_ptr -> param_0
1292 ); */
_txm_module_manager_tx_queue_delete_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)1293 static ALIGN_TYPE _txm_module_manager_tx_queue_delete_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
1294 {
1295
1296 ALIGN_TYPE return_value;
1297
1298 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1299 {
1300 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE)))
1301 return(TXM_MODULE_INVALID_MEMORY);
1302 }
1303
1304 return_value = (ALIGN_TYPE) _txe_queue_delete(
1305 (TX_QUEUE *) param_0
1306 );
1307
1308 /* Deallocate object memory. */
1309 if (return_value == TX_SUCCESS)
1310 {
1311 return_value = _txm_module_manager_object_deallocate((VOID *) param_0);
1312 }
1313 return(return_value);
1314 }
1315 #endif
1316
1317 #ifndef TXM_QUEUE_FLUSH_CALL_NOT_USED
1318 /* UINT _txe_queue_flush(
1319 TX_QUEUE *queue_ptr -> param_0
1320 ); */
_txm_module_manager_tx_queue_flush_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)1321 static ALIGN_TYPE _txm_module_manager_tx_queue_flush_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
1322 {
1323
1324 ALIGN_TYPE return_value;
1325
1326 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1327 {
1328 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE)))
1329 return(TXM_MODULE_INVALID_MEMORY);
1330 }
1331
1332 return_value = (ALIGN_TYPE) _txe_queue_flush(
1333 (TX_QUEUE *) param_0
1334 );
1335 return(return_value);
1336 }
1337 #endif
1338
1339 #ifndef TXM_QUEUE_FRONT_SEND_CALL_NOT_USED
1340 /* UINT _txe_queue_front_send(
1341 TX_QUEUE *queue_ptr, -> param_0
1342 VOID *source_ptr, -> param_1
1343 ULONG wait_option -> param_2
1344 ); */
_txm_module_manager_tx_queue_front_send_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)1345 static ALIGN_TYPE _txm_module_manager_tx_queue_front_send_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
1346 {
1347
1348 ALIGN_TYPE return_value;
1349 TX_QUEUE *queue_ptr;
1350
1351 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1352 {
1353 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE)))
1354 return(TXM_MODULE_INVALID_MEMORY);
1355
1356 /* We need to get the size of the message from the queue. */
1357 queue_ptr = (TX_QUEUE *) param_0;
1358 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_READ(module_instance, param_1, queue_ptr -> tx_queue_message_size))
1359 return(TXM_MODULE_INVALID_MEMORY);
1360 }
1361
1362 return_value = (ALIGN_TYPE) _txe_queue_front_send(
1363 (TX_QUEUE *) param_0,
1364 (VOID *) param_1,
1365 (ULONG) param_2
1366 );
1367 return(return_value);
1368 }
1369 #endif
1370
1371 #ifndef TXM_QUEUE_INFO_GET_CALL_NOT_USED
1372 /* UINT _txe_queue_info_get(
1373 TX_QUEUE *queue_ptr, -> param_0
1374 CHAR **name, -> param_1
1375 ULONG *enqueued, -> extra_parameters[0]
1376 ULONG *available_storage, -> extra_parameters[1]
1377 TX_THREAD **first_suspended, -> extra_parameters[2]
1378 ULONG *suspended_count, -> extra_parameters[3]
1379 TX_QUEUE **next_queue -> extra_parameters[4]
1380 ); */
_txm_module_manager_tx_queue_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1381 static ALIGN_TYPE _txm_module_manager_tx_queue_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1382 {
1383
1384 ALIGN_TYPE return_value;
1385
1386 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1387 {
1388 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE)))
1389 return(TXM_MODULE_INVALID_MEMORY);
1390
1391 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *)))
1392 return(TXM_MODULE_INVALID_MEMORY);
1393
1394 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[5])))
1395 return(TXM_MODULE_INVALID_MEMORY);
1396
1397 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
1398 return(TXM_MODULE_INVALID_MEMORY);
1399
1400 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
1401 return(TXM_MODULE_INVALID_MEMORY);
1402
1403 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(TX_THREAD *)))
1404 return(TXM_MODULE_INVALID_MEMORY);
1405
1406 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
1407 return(TXM_MODULE_INVALID_MEMORY);
1408
1409 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(TX_QUEUE *)))
1410 return(TXM_MODULE_INVALID_MEMORY);
1411 }
1412
1413 return_value = (ALIGN_TYPE) _txe_queue_info_get(
1414 (TX_QUEUE *) param_0,
1415 (CHAR **) param_1,
1416 (ULONG *) extra_parameters[0],
1417 (ULONG *) extra_parameters[1],
1418 (TX_THREAD **) extra_parameters[2],
1419 (ULONG *) extra_parameters[3],
1420 (TX_QUEUE **) extra_parameters[4]
1421 );
1422 return(return_value);
1423 }
1424 #endif
1425
1426 #ifndef TXM_QUEUE_PERFORMANCE_INFO_GET_CALL_NOT_USED
1427 /* UINT _tx_queue_performance_info_get(
1428 TX_QUEUE *queue_ptr, -> param_0
1429 ULONG *messages_sent, -> param_1
1430 ULONG *messages_received, -> extra_parameters[0]
1431 ULONG *empty_suspensions, -> extra_parameters[1]
1432 ULONG *full_suspensions, -> extra_parameters[2]
1433 ULONG *full_errors, -> extra_parameters[3]
1434 ULONG *timeouts -> extra_parameters[4]
1435 ); */
_txm_module_manager_tx_queue_performance_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1436 static ALIGN_TYPE _txm_module_manager_tx_queue_performance_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1437 {
1438
1439 ALIGN_TYPE return_value;
1440
1441 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1442 {
1443 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE)))
1444 return(TXM_MODULE_INVALID_MEMORY);
1445
1446 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
1447 return(TXM_MODULE_INVALID_MEMORY);
1448
1449 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[5])))
1450 return(TXM_MODULE_INVALID_MEMORY);
1451
1452 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
1453 return(TXM_MODULE_INVALID_MEMORY);
1454
1455 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
1456 return(TXM_MODULE_INVALID_MEMORY);
1457
1458 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
1459 return(TXM_MODULE_INVALID_MEMORY);
1460
1461 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
1462 return(TXM_MODULE_INVALID_MEMORY);
1463
1464 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(ULONG)))
1465 return(TXM_MODULE_INVALID_MEMORY);
1466 }
1467
1468 return_value = (ALIGN_TYPE) _tx_queue_performance_info_get(
1469 (TX_QUEUE *) param_0,
1470 (ULONG *) param_1,
1471 (ULONG *) extra_parameters[0],
1472 (ULONG *) extra_parameters[1],
1473 (ULONG *) extra_parameters[2],
1474 (ULONG *) extra_parameters[3],
1475 (ULONG *) extra_parameters[4]
1476 );
1477 return(return_value);
1478 }
1479 #endif
1480
1481 #ifndef TXM_QUEUE_PERFORMANCE_SYSTEM_INFO_GET_CALL_NOT_USED
1482 /* UINT _tx_queue_performance_system_info_get(
1483 ULONG *messages_sent, -> param_0
1484 ULONG *messages_received, -> param_1
1485 ULONG *empty_suspensions, -> extra_parameters[0]
1486 ULONG *full_suspensions, -> extra_parameters[1]
1487 ULONG *full_errors, -> extra_parameters[2]
1488 ULONG *timeouts -> extra_parameters[3]
1489 ); */
_txm_module_manager_tx_queue_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1490 static ALIGN_TYPE _txm_module_manager_tx_queue_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1491 {
1492
1493 ALIGN_TYPE return_value;
1494
1495 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1496 {
1497 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_0, sizeof(ULONG)))
1498 return(TXM_MODULE_INVALID_MEMORY);
1499
1500 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
1501 return(TXM_MODULE_INVALID_MEMORY);
1502
1503 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[4])))
1504 return(TXM_MODULE_INVALID_MEMORY);
1505
1506 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
1507 return(TXM_MODULE_INVALID_MEMORY);
1508
1509 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
1510 return(TXM_MODULE_INVALID_MEMORY);
1511
1512 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
1513 return(TXM_MODULE_INVALID_MEMORY);
1514
1515 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
1516 return(TXM_MODULE_INVALID_MEMORY);
1517 }
1518
1519 return_value = (ALIGN_TYPE) _tx_queue_performance_system_info_get(
1520 (ULONG *) param_0,
1521 (ULONG *) param_1,
1522 (ULONG *) extra_parameters[0],
1523 (ULONG *) extra_parameters[1],
1524 (ULONG *) extra_parameters[2],
1525 (ULONG *) extra_parameters[3]
1526 );
1527 return(return_value);
1528 }
1529 #endif
1530
1531 #ifndef TXM_QUEUE_PRIORITIZE_CALL_NOT_USED
1532 /* UINT _txe_queue_prioritize(
1533 TX_QUEUE *queue_ptr -> param_0
1534 ); */
_txm_module_manager_tx_queue_prioritize_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)1535 static ALIGN_TYPE _txm_module_manager_tx_queue_prioritize_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
1536 {
1537
1538 ALIGN_TYPE return_value;
1539
1540 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1541 {
1542 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE)))
1543 return(TXM_MODULE_INVALID_MEMORY);
1544 }
1545
1546 return_value = (ALIGN_TYPE) _txe_queue_prioritize(
1547 (TX_QUEUE *) param_0
1548 );
1549 return(return_value);
1550 }
1551 #endif
1552
1553 #ifndef TXM_QUEUE_RECEIVE_CALL_NOT_USED
1554 /* UINT _txe_queue_receive(
1555 TX_QUEUE *queue_ptr, -> param_0
1556 VOID *destination_ptr, -> param_1
1557 ULONG wait_option -> param_2
1558 ); */
_txm_module_manager_tx_queue_receive_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)1559 static ALIGN_TYPE _txm_module_manager_tx_queue_receive_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
1560 {
1561
1562 ALIGN_TYPE return_value;
1563 TX_QUEUE *queue_ptr;
1564
1565 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1566 {
1567 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE)))
1568 return(TXM_MODULE_INVALID_MEMORY);
1569
1570 /* We need to get the max size of the buffer from the queue. */
1571 queue_ptr = (TX_QUEUE *) param_0;
1572 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)*queue_ptr -> tx_queue_message_size))
1573 return(TXM_MODULE_INVALID_MEMORY);
1574 }
1575
1576 return_value = (ALIGN_TYPE) _txe_queue_receive(
1577 (TX_QUEUE *) param_0,
1578 (VOID *) param_1,
1579 (ULONG) param_2
1580 );
1581 return(return_value);
1582 }
1583 #endif
1584
1585 #ifndef TXM_QUEUE_SEND_CALL_NOT_USED
1586 /* UINT _txe_queue_send(
1587 TX_QUEUE *queue_ptr, -> param_0
1588 VOID *source_ptr, -> param_1
1589 ULONG wait_option -> param_2
1590 ); */
_txm_module_manager_tx_queue_send_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)1591 static ALIGN_TYPE _txm_module_manager_tx_queue_send_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
1592 {
1593
1594 ALIGN_TYPE return_value;
1595 TX_QUEUE *queue_ptr;
1596
1597 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1598 {
1599 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE)))
1600 return(TXM_MODULE_INVALID_MEMORY);
1601
1602 /* We need to get the size of the message from the queue. */
1603 queue_ptr = (TX_QUEUE *) param_0;
1604 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_READ(module_instance, param_1, sizeof(ULONG)*queue_ptr -> tx_queue_message_size))
1605 return(TXM_MODULE_INVALID_MEMORY);
1606 }
1607
1608 return_value = (ALIGN_TYPE) _txe_queue_send(
1609 (TX_QUEUE *) param_0,
1610 (VOID *) param_1,
1611 (ULONG) param_2
1612 );
1613 return(return_value);
1614 }
1615 #endif
1616
1617 #ifndef TXM_QUEUE_SEND_NOTIFY_CALL_NOT_USED
1618 /* UINT _txe_queue_send_notify(
1619 TX_QUEUE *queue_ptr, -> param_0
1620 VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr) -> param_1
1621 ); */
_txm_module_manager_tx_queue_send_notify_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1)1622 static ALIGN_TYPE _txm_module_manager_tx_queue_send_notify_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1)
1623 {
1624
1625 ALIGN_TYPE return_value;
1626 TX_QUEUE *queue_ptr = (TX_QUEUE *) param_0;
1627 VOID (*queue_send_notify)(TX_QUEUE *);
1628
1629 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1630 {
1631 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE)))
1632 return(TXM_MODULE_INVALID_MEMORY);
1633
1634 /* Since we need to write to the object, ensure it's valid. */
1635 if ((queue_ptr == TX_NULL) || (queue_ptr -> tx_queue_id != TX_QUEUE_ID))
1636 return(TX_QUEUE_ERROR);
1637 }
1638
1639 /* Is it a disable request? */
1640 if ((void *) param_1 == TX_NULL)
1641 {
1642
1643 /* Clear the callback. */
1644 queue_send_notify = (VOID (*)(TX_QUEUE *)) TX_NULL;
1645 }
1646 else
1647 {
1648
1649 /* Setup trampoline values. */
1650 queue_ptr -> tx_queue_module_instance = (VOID *) module_instance;
1651 queue_ptr -> tx_queue_send_module_notify = (VOID (*)(TX_QUEUE *)) param_1;
1652 queue_send_notify = _txm_module_manager_queue_notify_trampoline;
1653 }
1654
1655 return_value = (ALIGN_TYPE) _txe_queue_send_notify(
1656 (TX_QUEUE *) param_0,
1657 (VOID (*)(TX_QUEUE *notify_queue_ptr)) queue_send_notify
1658 );
1659 return(return_value);
1660 }
1661 #endif
1662
1663 #ifndef TXM_SEMAPHORE_CEILING_PUT_CALL_NOT_USED
1664 /* UINT _txe_semaphore_ceiling_put(
1665 TX_SEMAPHORE *semaphore_ptr, -> param_0
1666 ULONG ceiling -> param_1
1667 ); */
_txm_module_manager_tx_semaphore_ceiling_put_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1)1668 static ALIGN_TYPE _txm_module_manager_tx_semaphore_ceiling_put_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1)
1669 {
1670
1671 ALIGN_TYPE return_value;
1672
1673 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1674 {
1675 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE)))
1676 return(TXM_MODULE_INVALID_MEMORY);
1677 }
1678
1679 return_value = (ALIGN_TYPE) _txe_semaphore_ceiling_put(
1680 (TX_SEMAPHORE *) param_0,
1681 (ULONG) param_1
1682 );
1683 return(return_value);
1684 }
1685 #endif
1686
1687 #ifndef TXM_SEMAPHORE_CREATE_CALL_NOT_USED
1688 /* UINT _txe_semaphore_create(
1689 TX_SEMAPHORE *semaphore_ptr, -> param_0
1690 CHAR *name_ptr, -> param_1
1691 ULONG initial_count, -> extra_parameters[0]
1692 UINT semaphore_control_block_size -> extra_parameters[1]
1693 ); */
_txm_module_manager_tx_semaphore_create_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1694 static ALIGN_TYPE _txm_module_manager_tx_semaphore_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1695 {
1696
1697 ALIGN_TYPE return_value;
1698
1699 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1700 {
1701 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, param_0, sizeof(TX_SEMAPHORE)))
1702 return(TXM_MODULE_INVALID_MEMORY);
1703
1704 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
1705 return(TXM_MODULE_INVALID_MEMORY);
1706
1707 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2])))
1708 return(TXM_MODULE_INVALID_MEMORY);
1709 }
1710
1711 return_value = (ALIGN_TYPE) _txe_semaphore_create(
1712 (TX_SEMAPHORE *) param_0,
1713 (CHAR *) param_1,
1714 (ULONG) extra_parameters[0],
1715 (UINT) extra_parameters[1]
1716 );
1717 return(return_value);
1718 }
1719 #endif
1720
1721 #ifndef TXM_SEMAPHORE_DELETE_CALL_NOT_USED
1722 /* UINT _txe_semaphore_delete(
1723 TX_SEMAPHORE *semaphore_ptr -> param_0
1724 ); */
_txm_module_manager_tx_semaphore_delete_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)1725 static ALIGN_TYPE _txm_module_manager_tx_semaphore_delete_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
1726 {
1727
1728 ALIGN_TYPE return_value;
1729
1730 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1731 {
1732 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE)))
1733 return(TXM_MODULE_INVALID_MEMORY);
1734 }
1735
1736 return_value = (ALIGN_TYPE) _txe_semaphore_delete(
1737 (TX_SEMAPHORE *) param_0
1738 );
1739
1740 /* Deallocate object memory. */
1741 if (return_value == TX_SUCCESS)
1742 {
1743 return_value = _txm_module_manager_object_deallocate((VOID *) param_0);
1744 }
1745 return(return_value);
1746 }
1747 #endif
1748
1749 #ifndef TXM_SEMAPHORE_GET_CALL_NOT_USED
1750 /* UINT _txe_semaphore_get(
1751 TX_SEMAPHORE *semaphore_ptr, -> param_0
1752 ULONG wait_option -> param_1
1753 ); */
_txm_module_manager_tx_semaphore_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1)1754 static ALIGN_TYPE _txm_module_manager_tx_semaphore_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1)
1755 {
1756
1757 ALIGN_TYPE return_value;
1758
1759 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1760 {
1761 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE)))
1762 return(TXM_MODULE_INVALID_MEMORY);
1763 }
1764
1765 return_value = (ALIGN_TYPE) _txe_semaphore_get(
1766 (TX_SEMAPHORE *) param_0,
1767 (ULONG) param_1
1768 );
1769 return(return_value);
1770 }
1771 #endif
1772
1773 #ifndef TXM_SEMAPHORE_INFO_GET_CALL_NOT_USED
1774 /* UINT _txe_semaphore_info_get(
1775 TX_SEMAPHORE *semaphore_ptr, -> param_0
1776 CHAR **name, -> param_1
1777 ULONG *current_value, -> extra_parameters[0]
1778 TX_THREAD **first_suspended, -> extra_parameters[1]
1779 ULONG *suspended_count, -> extra_parameters[2]
1780 TX_SEMAPHORE **next_semaphore -> extra_parameters[3]
1781 ); */
_txm_module_manager_tx_semaphore_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1782 static ALIGN_TYPE _txm_module_manager_tx_semaphore_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1783 {
1784
1785 ALIGN_TYPE return_value;
1786
1787 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1788 {
1789 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE)))
1790 return(TXM_MODULE_INVALID_MEMORY);
1791
1792 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *)))
1793 return(TXM_MODULE_INVALID_MEMORY);
1794
1795 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[4])))
1796 return(TXM_MODULE_INVALID_MEMORY);
1797
1798 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
1799 return(TXM_MODULE_INVALID_MEMORY);
1800
1801 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(TX_THREAD *)))
1802 return(TXM_MODULE_INVALID_MEMORY);
1803
1804 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
1805 return(TXM_MODULE_INVALID_MEMORY);
1806
1807 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(TX_SEMAPHORE *)))
1808 return(TXM_MODULE_INVALID_MEMORY);
1809 }
1810
1811 return_value = (ALIGN_TYPE) _txe_semaphore_info_get(
1812 (TX_SEMAPHORE *) param_0,
1813 (CHAR **) param_1,
1814 (ULONG *) extra_parameters[0],
1815 (TX_THREAD **) extra_parameters[1],
1816 (ULONG *) extra_parameters[2],
1817 (TX_SEMAPHORE **) extra_parameters[3]
1818 );
1819 return(return_value);
1820 }
1821 #endif
1822
1823 #ifndef TXM_SEMAPHORE_PERFORMANCE_INFO_GET_CALL_NOT_USED
1824 /* UINT _tx_semaphore_performance_info_get(
1825 TX_SEMAPHORE *semaphore_ptr, -> param_0
1826 ULONG *puts, -> param_1
1827 ULONG *gets, -> extra_parameters[0]
1828 ULONG *suspensions, -> extra_parameters[1]
1829 ULONG *timeouts -> extra_parameters[2]
1830 ); */
_txm_module_manager_tx_semaphore_performance_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1831 static ALIGN_TYPE _txm_module_manager_tx_semaphore_performance_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1832 {
1833
1834 ALIGN_TYPE return_value;
1835
1836 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1837 {
1838 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE)))
1839 return(TXM_MODULE_INVALID_MEMORY);
1840
1841 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
1842 return(TXM_MODULE_INVALID_MEMORY);
1843
1844 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[3])))
1845 return(TXM_MODULE_INVALID_MEMORY);
1846
1847 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
1848 return(TXM_MODULE_INVALID_MEMORY);
1849
1850 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
1851 return(TXM_MODULE_INVALID_MEMORY);
1852
1853 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
1854 return(TXM_MODULE_INVALID_MEMORY);
1855 }
1856
1857 return_value = (ALIGN_TYPE) _tx_semaphore_performance_info_get(
1858 (TX_SEMAPHORE *) param_0,
1859 (ULONG *) param_1,
1860 (ULONG *) extra_parameters[0],
1861 (ULONG *) extra_parameters[1],
1862 (ULONG *) extra_parameters[2]
1863 );
1864 return(return_value);
1865 }
1866 #endif
1867
1868 #ifndef TXM_SEMAPHORE_PERFORMANCE_SYSTEM_INFO_GET_CALL_NOT_USED
1869 /* UINT _tx_semaphore_performance_system_info_get(
1870 ULONG *puts, -> param_0
1871 ULONG *gets, -> param_1
1872 ULONG *suspensions, -> extra_parameters[0]
1873 ULONG *timeouts -> extra_parameters[1]
1874 ); */
_txm_module_manager_tx_semaphore_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)1875 static ALIGN_TYPE _txm_module_manager_tx_semaphore_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
1876 {
1877
1878 ALIGN_TYPE return_value;
1879
1880 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1881 {
1882 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_0, sizeof(ULONG)))
1883 return(TXM_MODULE_INVALID_MEMORY);
1884
1885 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
1886 return(TXM_MODULE_INVALID_MEMORY);
1887
1888 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2])))
1889 return(TXM_MODULE_INVALID_MEMORY);
1890
1891 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
1892 return(TXM_MODULE_INVALID_MEMORY);
1893
1894 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
1895 return(TXM_MODULE_INVALID_MEMORY);
1896 }
1897
1898 return_value = (ALIGN_TYPE) _tx_semaphore_performance_system_info_get(
1899 (ULONG *) param_0,
1900 (ULONG *) param_1,
1901 (ULONG *) extra_parameters[0],
1902 (ULONG *) extra_parameters[1]
1903 );
1904 return(return_value);
1905 }
1906 #endif
1907
1908 #ifndef TXM_SEMAPHORE_PRIORITIZE_CALL_NOT_USED
1909 /* UINT _txe_semaphore_prioritize(
1910 TX_SEMAPHORE *semaphore_ptr -> param_0
1911 ); */
_txm_module_manager_tx_semaphore_prioritize_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)1912 static ALIGN_TYPE _txm_module_manager_tx_semaphore_prioritize_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
1913 {
1914
1915 ALIGN_TYPE return_value;
1916
1917 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1918 {
1919 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE)))
1920 return(TXM_MODULE_INVALID_MEMORY);
1921 }
1922
1923 return_value = (ALIGN_TYPE) _txe_semaphore_prioritize(
1924 (TX_SEMAPHORE *) param_0
1925 );
1926 return(return_value);
1927 }
1928 #endif
1929
1930 #ifndef TXM_SEMAPHORE_PUT_CALL_NOT_USED
1931 /* UINT _txe_semaphore_put(
1932 TX_SEMAPHORE *semaphore_ptr -> param_0
1933 ); */
_txm_module_manager_tx_semaphore_put_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)1934 static ALIGN_TYPE _txm_module_manager_tx_semaphore_put_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
1935 {
1936
1937 ALIGN_TYPE return_value;
1938
1939 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1940 {
1941 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE)))
1942 return(TXM_MODULE_INVALID_MEMORY);
1943 }
1944
1945 return_value = (ALIGN_TYPE) _txe_semaphore_put(
1946 (TX_SEMAPHORE *) param_0
1947 );
1948 return(return_value);
1949 }
1950 #endif
1951
1952 #ifndef TXM_SEMAPHORE_PUT_NOTIFY_CALL_NOT_USED
1953 /* UINT _txe_semaphore_put_notify(
1954 TX_SEMAPHORE *semaphore_ptr, -> param_0
1955 VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr) -> param_1
1956 ); */
_txm_module_manager_tx_semaphore_put_notify_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1)1957 static ALIGN_TYPE _txm_module_manager_tx_semaphore_put_notify_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1)
1958 {
1959
1960 ALIGN_TYPE return_value;
1961 TX_SEMAPHORE *semaphore_ptr = (TX_SEMAPHORE *) param_0;
1962 VOID (*semaphore_put_notify)(TX_SEMAPHORE *);
1963
1964 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
1965 {
1966 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE)))
1967 return(TXM_MODULE_INVALID_MEMORY);
1968
1969 /* Since we need to write to the object, ensure it's valid. */
1970 if ((semaphore_ptr == TX_NULL) || (semaphore_ptr -> tx_semaphore_id != TX_SEMAPHORE_ID))
1971 return(TX_SEMAPHORE_ERROR);
1972 }
1973
1974 /* Is it a disable request? */
1975 if ((void *) param_1 == TX_NULL)
1976 {
1977
1978 /* Clear the callback. */
1979 semaphore_put_notify = (VOID (*)(TX_SEMAPHORE *)) TX_NULL;
1980 }
1981 else
1982 {
1983
1984 /* Setup trampoline values. */
1985 semaphore_ptr -> tx_semaphore_module_instance = (VOID *) module_instance;
1986 semaphore_ptr -> tx_semaphore_put_module_notify = (VOID (*)(TX_SEMAPHORE *)) param_1;
1987 semaphore_put_notify = _txm_module_manager_semaphore_notify_trampoline;
1988 }
1989
1990 return_value = (ALIGN_TYPE) _txe_semaphore_put_notify(
1991 (TX_SEMAPHORE *) param_0,
1992 (VOID (*)(TX_SEMAPHORE *notify_semaphore_ptr)) semaphore_put_notify
1993 );
1994 return(return_value);
1995 }
1996 #endif
1997
1998 #ifndef TXM_THREAD_CREATE_CALL_NOT_USED
1999 /* UINT _txe_thread_create(
2000 TX_THREAD *thread_ptr, -> param_0
2001 CHAR *name_ptr, -> param_1
2002 VOID (*entry_function)(ULONG entry_input), -> extra_parameters[0]
2003 ULONG entry_input, -> extra_parameters[1]
2004 VOID *stack_start, -> extra_parameters[2]
2005 ULONG stack_size, -> extra_parameters[3]
2006 UINT priority, -> extra_parameters[4]
2007 UINT preempt_threshold, -> extra_parameters[5]
2008 ULONG time_slice, -> extra_parameters[6]
2009 UINT auto_start, -> extra_parameters[7]
2010 UINT thread_control_block_size -> extra_parameters[8]
2011 ); */
_txm_module_manager_tx_thread_create_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2012 static ALIGN_TYPE _txm_module_manager_tx_thread_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2013 {
2014
2015 ALIGN_TYPE return_value;
2016
2017 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2018 {
2019 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, param_0, sizeof(TX_THREAD)))
2020 return(TXM_MODULE_INVALID_MEMORY);
2021
2022 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
2023 return(TXM_MODULE_INVALID_MEMORY);
2024
2025 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[9])))
2026 return(TXM_MODULE_INVALID_MEMORY);
2027
2028 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], extra_parameters[3]))
2029 return(TXM_MODULE_INVALID_MEMORY);
2030
2031 if (extra_parameters[4] < module_instance -> txm_module_instance_maximum_priority)
2032 return(TX_PRIORITY_ERROR);
2033
2034 if (extra_parameters[5] < module_instance -> txm_module_instance_maximum_priority)
2035 return(TX_THRESH_ERROR);
2036 }
2037
2038 return_value = (ALIGN_TYPE) _txm_module_manager_thread_create(
2039 (TX_THREAD *) param_0,
2040 (CHAR *) param_1,
2041 module_instance -> txm_module_instance_shell_entry_function,
2042 (VOID (*)(ULONG entry_input)) extra_parameters[0],
2043 (ULONG) extra_parameters[1],
2044 (VOID *) extra_parameters[2],
2045 (ULONG) extra_parameters[3],
2046 (UINT) extra_parameters[4],
2047 (UINT) extra_parameters[5],
2048 (ULONG) extra_parameters[6],
2049 (UINT) extra_parameters[7],
2050 (UINT) extra_parameters[8],
2051 module_instance
2052 );
2053 return(return_value);
2054 }
2055 #endif
2056
2057 #ifndef TXM_THREAD_DELETE_CALL_NOT_USED
2058 /* UINT _txe_thread_delete(
2059 TX_THREAD *thread_ptr -> param_0
2060 ); */
_txm_module_manager_tx_thread_delete_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2061 static ALIGN_TYPE _txm_module_manager_tx_thread_delete_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2062 {
2063
2064 ALIGN_TYPE return_value;
2065
2066 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2067 {
2068 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2069 return(TXM_MODULE_INVALID_MEMORY);
2070 }
2071
2072 return_value = (ALIGN_TYPE) _txe_thread_delete(
2073 (TX_THREAD *) param_0
2074 );
2075
2076 /* Deallocate object memory. */
2077 if (return_value == TX_SUCCESS)
2078 {
2079 return_value = _txm_module_manager_object_deallocate((VOID *) param_0);
2080 }
2081 return(return_value);
2082 }
2083 #endif
2084
2085 #ifndef TXM_THREAD_ENTRY_EXIT_NOTIFY_CALL_NOT_USED
2086 /* UINT _txe_thread_entry_exit_notify(
2087 TX_THREAD *thread_ptr, -> param_0
2088 VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type) -> param_1
2089 ); */
_txm_module_manager_tx_thread_entry_exit_notify_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1)2090 static ALIGN_TYPE _txm_module_manager_tx_thread_entry_exit_notify_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1)
2091 {
2092
2093 ALIGN_TYPE return_value;
2094 TX_THREAD *thread_ptr = (TX_THREAD *) param_0;
2095 TXM_MODULE_THREAD_ENTRY_INFO *thread_entry_info_ptr;
2096 VOID (*thread_entry_exit_notify)(TX_THREAD *, UINT);
2097
2098 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2099 {
2100 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2101 return(TXM_MODULE_INVALID_MEMORY);
2102
2103 /* Since we need to write to the object, ensure it's valid. */
2104 if ((thread_ptr == TX_NULL) || (thread_ptr -> tx_thread_id != TX_THREAD_ID))
2105 return(TX_THREAD_ERROR);
2106
2107 /* Ensure this thread is from the module trying to set the callback. */
2108 if (thread_ptr -> tx_thread_module_instance_ptr != module_instance)
2109 return(TXM_MODULE_INVALID);
2110 }
2111
2112 /* Is it a disable request? */
2113 if ((void *) param_1 == TX_NULL)
2114 {
2115
2116 /* Clear the callback. */
2117 thread_entry_exit_notify = (VOID (*)(TX_THREAD *, UINT)) TX_NULL;
2118 }
2119 else
2120 {
2121
2122 /* Setup trampoline values. */
2123 thread_entry_info_ptr = (TXM_MODULE_THREAD_ENTRY_INFO *) thread_ptr -> tx_thread_module_entry_info_ptr;
2124 thread_entry_info_ptr -> txm_module_thread_entry_info_exit_notify = (VOID (*)(TX_THREAD *, UINT)) param_1;
2125 thread_entry_exit_notify = _txm_module_manager_thread_notify_trampoline;
2126 }
2127
2128 return_value = (ALIGN_TYPE) _txe_thread_entry_exit_notify(
2129 (TX_THREAD *) param_0,
2130 (VOID (*)(TX_THREAD *notify_thread_ptr, UINT type)) thread_entry_exit_notify
2131 );
2132 return(return_value);
2133 }
2134 #endif
2135
2136 #ifndef TXM_THREAD_IDENTIFY_CALL_NOT_USED
2137 /* TX_THREAD *_tx_thread_identify(); */
_txm_module_manager_tx_thread_identify_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2138 static ALIGN_TYPE _txm_module_manager_tx_thread_identify_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2139 {
2140
2141 ALIGN_TYPE return_value;
2142
2143 return_value = (ALIGN_TYPE) _tx_thread_identify();
2144 return(return_value);
2145 }
2146 #endif
2147
2148 #ifndef TXM_THREAD_INFO_GET_CALL_NOT_USED
2149 /* UINT _txe_thread_info_get(
2150 TX_THREAD *thread_ptr, -> param_0
2151 CHAR **name, -> param_1
2152 UINT *state, -> extra_parameters[0]
2153 ULONG *run_count, -> extra_parameters[1]
2154 UINT *priority, -> extra_parameters[2]
2155 UINT *preemption_threshold, -> extra_parameters[3]
2156 ULONG *time_slice, -> extra_parameters[4]
2157 TX_THREAD **next_thread, -> extra_parameters[5]
2158 TX_THREAD **next_suspended_thread -> extra_parameters[6]
2159 ); */
_txm_module_manager_tx_thread_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2160 static ALIGN_TYPE _txm_module_manager_tx_thread_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2161 {
2162
2163 ALIGN_TYPE return_value;
2164
2165 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2166 {
2167 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2168 return(TXM_MODULE_INVALID_MEMORY);
2169
2170 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *)))
2171 return(TXM_MODULE_INVALID_MEMORY);
2172
2173 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[7])))
2174 return(TXM_MODULE_INVALID_MEMORY);
2175
2176 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(UINT)))
2177 return(TXM_MODULE_INVALID_MEMORY);
2178
2179 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
2180 return(TXM_MODULE_INVALID_MEMORY);
2181
2182 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(UINT)))
2183 return(TXM_MODULE_INVALID_MEMORY);
2184
2185 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(UINT)))
2186 return(TXM_MODULE_INVALID_MEMORY);
2187
2188 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(ULONG)))
2189 return(TXM_MODULE_INVALID_MEMORY);
2190
2191 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[5], sizeof(TX_THREAD *)))
2192 return(TXM_MODULE_INVALID_MEMORY);
2193
2194 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[6], sizeof(TX_THREAD *)))
2195 return(TXM_MODULE_INVALID_MEMORY);
2196 }
2197
2198 return_value = (ALIGN_TYPE) _txe_thread_info_get(
2199 (TX_THREAD *) param_0,
2200 (CHAR **) param_1,
2201 (UINT *) extra_parameters[0],
2202 (ULONG *) extra_parameters[1],
2203 (UINT *) extra_parameters[2],
2204 (UINT *) extra_parameters[3],
2205 (ULONG *) extra_parameters[4],
2206 (TX_THREAD **) extra_parameters[5],
2207 (TX_THREAD **) extra_parameters[6]
2208 );
2209 return(return_value);
2210 }
2211 #endif
2212
2213 #ifndef TXM_THREAD_INTERRUPT_CONTROL_CALL_NOT_USED
2214 /* UINT _tx_thread_interrupt_control(
2215 UINT new_posture -> param_0
2216 ); */
_txm_module_manager_tx_thread_interrupt_control_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2217 static ALIGN_TYPE _txm_module_manager_tx_thread_interrupt_control_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2218 {
2219
2220 ALIGN_TYPE return_value;
2221
2222 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_USER_MODE)
2223 return(TXM_MODULE_INVALID_PROPERTIES);
2224
2225 return_value = (ALIGN_TYPE) _tx_thread_interrupt_control(
2226 (UINT) param_0
2227 );
2228 return(return_value);
2229 }
2230 #endif
2231
2232 #ifndef TXM_THREAD_PERFORMANCE_INFO_GET_CALL_NOT_USED
2233 /* UINT _tx_thread_performance_info_get(
2234 TX_THREAD *thread_ptr, -> param_0
2235 ULONG *resumptions, -> param_1
2236 ULONG *suspensions, -> extra_parameters[0]
2237 ULONG *solicited_preemptions, -> extra_parameters[1]
2238 ULONG *interrupt_preemptions, -> extra_parameters[2]
2239 ULONG *priority_inversions, -> extra_parameters[3]
2240 ULONG *time_slices, -> extra_parameters[4]
2241 ULONG *relinquishes, -> extra_parameters[5]
2242 ULONG *timeouts, -> extra_parameters[6]
2243 ULONG *wait_aborts, -> extra_parameters[7]
2244 TX_THREAD **last_preempted_by -> extra_parameters[8]
2245 ); */
_txm_module_manager_tx_thread_performance_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2246 static ALIGN_TYPE _txm_module_manager_tx_thread_performance_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2247 {
2248
2249 ALIGN_TYPE return_value;
2250
2251 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2252 {
2253 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2254 return(TXM_MODULE_INVALID_MEMORY);
2255
2256 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
2257 return(TXM_MODULE_INVALID_MEMORY);
2258
2259 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[9])))
2260 return(TXM_MODULE_INVALID_MEMORY);
2261
2262 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
2263 return(TXM_MODULE_INVALID_MEMORY);
2264
2265 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
2266 return(TXM_MODULE_INVALID_MEMORY);
2267
2268 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
2269 return(TXM_MODULE_INVALID_MEMORY);
2270
2271 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
2272 return(TXM_MODULE_INVALID_MEMORY);
2273
2274 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(ULONG)))
2275 return(TXM_MODULE_INVALID_MEMORY);
2276
2277 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[5], sizeof(ULONG)))
2278 return(TXM_MODULE_INVALID_MEMORY);
2279
2280 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[6], sizeof(ULONG)))
2281 return(TXM_MODULE_INVALID_MEMORY);
2282
2283 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[7], sizeof(ULONG)))
2284 return(TXM_MODULE_INVALID_MEMORY);
2285
2286 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[8], sizeof(TX_THREAD *)))
2287 return(TXM_MODULE_INVALID_MEMORY);
2288 }
2289
2290 return_value = (ALIGN_TYPE) _tx_thread_performance_info_get(
2291 (TX_THREAD *) param_0,
2292 (ULONG *) param_1,
2293 (ULONG *) extra_parameters[0],
2294 (ULONG *) extra_parameters[1],
2295 (ULONG *) extra_parameters[2],
2296 (ULONG *) extra_parameters[3],
2297 (ULONG *) extra_parameters[4],
2298 (ULONG *) extra_parameters[5],
2299 (ULONG *) extra_parameters[6],
2300 (ULONG *) extra_parameters[7],
2301 (TX_THREAD **) extra_parameters[8]
2302 );
2303 return(return_value);
2304 }
2305 #endif
2306
2307 #ifndef TXM_THREAD_PERFORMANCE_SYSTEM_INFO_GET_CALL_NOT_USED
2308 /* UINT _tx_thread_performance_system_info_get(
2309 ULONG *resumptions, -> param_0
2310 ULONG *suspensions, -> param_1
2311 ULONG *solicited_preemptions, -> extra_parameters[0]
2312 ULONG *interrupt_preemptions, -> extra_parameters[1]
2313 ULONG *priority_inversions, -> extra_parameters[2]
2314 ULONG *time_slices, -> extra_parameters[3]
2315 ULONG *relinquishes, -> extra_parameters[4]
2316 ULONG *timeouts, -> extra_parameters[5]
2317 ULONG *wait_aborts, -> extra_parameters[6]
2318 ULONG *non_idle_returns, -> extra_parameters[7]
2319 ULONG *idle_returns -> extra_parameters[8]
2320 ); */
_txm_module_manager_tx_thread_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2321 static ALIGN_TYPE _txm_module_manager_tx_thread_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2322 {
2323
2324 ALIGN_TYPE return_value;
2325
2326 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2327 {
2328 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_0, sizeof(ULONG)))
2329 return(TXM_MODULE_INVALID_MEMORY);
2330
2331 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
2332 return(TXM_MODULE_INVALID_MEMORY);
2333
2334 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[9])))
2335 return(TXM_MODULE_INVALID_MEMORY);
2336
2337 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
2338 return(TXM_MODULE_INVALID_MEMORY);
2339
2340 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
2341 return(TXM_MODULE_INVALID_MEMORY);
2342
2343 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
2344 return(TXM_MODULE_INVALID_MEMORY);
2345
2346 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
2347 return(TXM_MODULE_INVALID_MEMORY);
2348
2349 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[4], sizeof(ULONG)))
2350 return(TXM_MODULE_INVALID_MEMORY);
2351
2352 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[5], sizeof(ULONG)))
2353 return(TXM_MODULE_INVALID_MEMORY);
2354
2355 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[6], sizeof(ULONG)))
2356 return(TXM_MODULE_INVALID_MEMORY);
2357
2358 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[7], sizeof(ULONG)))
2359 return(TXM_MODULE_INVALID_MEMORY);
2360
2361 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[8], sizeof(ULONG)))
2362 return(TXM_MODULE_INVALID_MEMORY);
2363 }
2364
2365 return_value = (ALIGN_TYPE) _tx_thread_performance_system_info_get(
2366 (ULONG *) param_0,
2367 (ULONG *) param_1,
2368 (ULONG *) extra_parameters[0],
2369 (ULONG *) extra_parameters[1],
2370 (ULONG *) extra_parameters[2],
2371 (ULONG *) extra_parameters[3],
2372 (ULONG *) extra_parameters[4],
2373 (ULONG *) extra_parameters[5],
2374 (ULONG *) extra_parameters[6],
2375 (ULONG *) extra_parameters[7],
2376 (ULONG *) extra_parameters[8]
2377 );
2378 return(return_value);
2379 }
2380 #endif
2381
2382 #ifndef TXM_THREAD_PREEMPTION_CHANGE_CALL_NOT_USED
2383 /* UINT _txe_thread_preemption_change(
2384 TX_THREAD *thread_ptr, -> param_0
2385 UINT new_threshold, -> param_1
2386 UINT *old_threshold -> param_2
2387 ); */
_txm_module_manager_tx_thread_preemption_change_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)2388 static ALIGN_TYPE _txm_module_manager_tx_thread_preemption_change_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
2389 {
2390
2391 ALIGN_TYPE return_value;
2392
2393 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2394 {
2395 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2396 return(TXM_MODULE_INVALID_MEMORY);
2397
2398 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_2, sizeof(UINT)))
2399 return(TXM_MODULE_INVALID_MEMORY);
2400 }
2401
2402 return_value = (ALIGN_TYPE) _txe_thread_preemption_change(
2403 (TX_THREAD *) param_0,
2404 (UINT) param_1,
2405 (UINT *) param_2
2406 );
2407 return(return_value);
2408 }
2409 #endif
2410
2411 #ifndef TXM_THREAD_PRIORITY_CHANGE_CALL_NOT_USED
2412 /* UINT _txe_thread_priority_change(
2413 TX_THREAD *thread_ptr, -> param_0
2414 UINT new_priority, -> param_1
2415 UINT *old_priority -> param_2
2416 ); */
_txm_module_manager_tx_thread_priority_change_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)2417 static ALIGN_TYPE _txm_module_manager_tx_thread_priority_change_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
2418 {
2419
2420 ALIGN_TYPE return_value;
2421
2422 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2423 {
2424 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2425 return(TXM_MODULE_INVALID_MEMORY);
2426
2427 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_2, sizeof(UINT)))
2428 return(TXM_MODULE_INVALID_MEMORY);
2429 }
2430
2431 return_value = (ALIGN_TYPE) _txe_thread_priority_change(
2432 (TX_THREAD *) param_0,
2433 (UINT) param_1,
2434 (UINT *) param_2
2435 );
2436 return(return_value);
2437 }
2438 #endif
2439
2440 #ifndef TXM_THREAD_RELINQUISH_CALL_NOT_USED
2441 /* VOID _txe_thread_relinquish(); */
_txm_module_manager_tx_thread_relinquish_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2442 static ALIGN_TYPE _txm_module_manager_tx_thread_relinquish_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2443 {
2444
2445 _txe_thread_relinquish();
2446 return(TX_SUCCESS);
2447 }
2448 #endif
2449
2450 #ifndef TXM_THREAD_RESET_CALL_NOT_USED
2451 /* UINT _txe_thread_reset(
2452 TX_THREAD *thread_ptr -> param_0
2453 ); */
_txm_module_manager_tx_thread_reset_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2454 static ALIGN_TYPE _txm_module_manager_tx_thread_reset_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2455 {
2456
2457 ALIGN_TYPE return_value;
2458
2459 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2460 {
2461 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2462 return(TXM_MODULE_INVALID_MEMORY);
2463 }
2464
2465 return_value = (ALIGN_TYPE) _txm_module_manager_thread_reset(
2466 (TX_THREAD *) param_0
2467 );
2468 return(return_value);
2469 }
2470 #endif
2471
2472 #ifndef TXM_THREAD_RESUME_CALL_NOT_USED
2473 /* UINT _txe_thread_resume(
2474 TX_THREAD *thread_ptr -> param_0
2475 ); */
_txm_module_manager_tx_thread_resume_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2476 static ALIGN_TYPE _txm_module_manager_tx_thread_resume_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2477 {
2478
2479 ALIGN_TYPE return_value;
2480
2481 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2482 {
2483 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2484 return(TXM_MODULE_INVALID_MEMORY);
2485 }
2486
2487 return_value = (ALIGN_TYPE) _txe_thread_resume(
2488 (TX_THREAD *) param_0
2489 );
2490 return(return_value);
2491 }
2492 #endif
2493
2494 #ifndef TXM_THREAD_SLEEP_CALL_NOT_USED
2495 /* UINT _tx_thread_sleep(
2496 ULONG timer_ticks -> param_0
2497 ); */
_txm_module_manager_tx_thread_sleep_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2498 static ALIGN_TYPE _txm_module_manager_tx_thread_sleep_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2499 {
2500
2501 ALIGN_TYPE return_value;
2502
2503 return_value = (ALIGN_TYPE) _tx_thread_sleep(
2504 (ULONG) param_0
2505 );
2506 return(return_value);
2507 }
2508 #endif
2509
2510 #ifndef TXM_THREAD_STACK_ERROR_NOTIFY_CALL_NOT_USED
2511 /* UINT _tx_thread_stack_error_notify(
2512 VOID (*stack_error_handler)(TX_THREAD *thread_ptr) -> param_0
2513 ); */
_txm_module_manager_tx_thread_stack_error_notify_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2514 static ALIGN_TYPE _txm_module_manager_tx_thread_stack_error_notify_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2515 {
2516
2517 ALIGN_TYPE return_value;
2518
2519 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_USER_MODE)
2520 return(TXM_MODULE_INVALID_PROPERTIES);
2521
2522 return_value = (ALIGN_TYPE) _tx_thread_stack_error_notify(
2523 (VOID (*)(TX_THREAD *thread_ptr)) param_0
2524 );
2525 return(return_value);
2526 }
2527 #endif
2528
2529 #ifndef TXM_THREAD_SUSPEND_CALL_NOT_USED
2530 /* UINT _txe_thread_suspend(
2531 TX_THREAD *thread_ptr -> param_0
2532 ); */
_txm_module_manager_tx_thread_suspend_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2533 static ALIGN_TYPE _txm_module_manager_tx_thread_suspend_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2534 {
2535
2536 ALIGN_TYPE return_value;
2537
2538 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2539 {
2540 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2541 return(TXM_MODULE_INVALID_MEMORY);
2542 }
2543
2544 return_value = (ALIGN_TYPE) _txe_thread_suspend(
2545 (TX_THREAD *) param_0
2546 );
2547 return(return_value);
2548 }
2549 #endif
2550
2551 #ifndef TXM_THREAD_SYSTEM_SUSPEND_CALL_NOT_USED
2552 /* VOID _tx_thread_system_suspend(
2553 TX_THREAD *thread_ptr -> param_0
2554 ); */
_txm_module_manager_tx_thread_system_suspend_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2555 static ALIGN_TYPE _txm_module_manager_tx_thread_system_suspend_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2556 {
2557
2558 TX_INTERRUPT_SAVE_AREA
2559
2560 TX_THREAD *thread_ptr;
2561
2562 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2563 {
2564 /* Ensure the thread is suspending itself. */
2565 if (((TX_THREAD *) param_0) != _tx_thread_current_ptr)
2566 {
2567 return(TXM_MODULE_INVALID_MEMORY);
2568 }
2569 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2570 return(TXM_MODULE_INVALID_MEMORY);
2571 }
2572
2573 /* Get the thread pointer. */
2574 thread_ptr = (TX_THREAD *) param_0;
2575
2576 /* Disable interrupts temporarily. */
2577 TX_DISABLE
2578
2579 /* Set the status to suspending, in order to indicate the suspension
2580 is in progress. */
2581 thread_ptr -> tx_thread_state = TX_COMPLETED;
2582
2583 /* Thread state change. */
2584 TX_THREAD_STATE_CHANGE(thread_ptr, TX_COMPLETED)
2585
2586 /* Set the suspending flag. */
2587 thread_ptr -> tx_thread_suspending = TX_TRUE;
2588
2589 /* Setup for no timeout period. */
2590 thread_ptr -> tx_thread_timer.tx_timer_internal_remaining_ticks = 0;
2591
2592 /* Temporarily disable preemption. */
2593 _tx_thread_preempt_disable++;
2594
2595 /* Restore interrupts. */
2596 TX_RESTORE
2597
2598 /* Perform any additional activities for tool or user purpose. */
2599 TX_THREAD_COMPLETED_EXTENSION(thread_ptr);
2600
2601 _tx_thread_system_suspend(
2602 (TX_THREAD *) param_0
2603 );
2604 return(TX_SUCCESS);
2605 }
2606 #endif
2607
2608 #ifndef TXM_THREAD_TERMINATE_CALL_NOT_USED
2609 /* UINT _txe_thread_terminate(
2610 TX_THREAD *thread_ptr -> param_0
2611 ); */
_txm_module_manager_tx_thread_terminate_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2612 static ALIGN_TYPE _txm_module_manager_tx_thread_terminate_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2613 {
2614
2615 ALIGN_TYPE return_value;
2616
2617 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2618 {
2619 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2620 return(TXM_MODULE_INVALID_MEMORY);
2621 }
2622
2623 return_value = (ALIGN_TYPE) _txe_thread_terminate(
2624 (TX_THREAD *) param_0
2625 );
2626 return(return_value);
2627 }
2628 #endif
2629
2630 #ifndef TXM_THREAD_TIME_SLICE_CHANGE_CALL_NOT_USED
2631 /* UINT _txe_thread_time_slice_change(
2632 TX_THREAD *thread_ptr, -> param_0
2633 ULONG new_time_slice, -> param_1
2634 ULONG *old_time_slice -> param_2
2635 ); */
_txm_module_manager_tx_thread_time_slice_change_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)2636 static ALIGN_TYPE _txm_module_manager_tx_thread_time_slice_change_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
2637 {
2638
2639 ALIGN_TYPE return_value;
2640
2641 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2642 {
2643 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2644 return(TXM_MODULE_INVALID_MEMORY);
2645
2646 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_2, sizeof(ULONG)))
2647 return(TXM_MODULE_INVALID_MEMORY);
2648 }
2649
2650 return_value = (ALIGN_TYPE) _txe_thread_time_slice_change(
2651 (TX_THREAD *) param_0,
2652 (ULONG) param_1,
2653 (ULONG *) param_2
2654 );
2655 return(return_value);
2656 }
2657 #endif
2658
2659 #ifndef TXM_THREAD_WAIT_ABORT_CALL_NOT_USED
2660 /* UINT _txe_thread_wait_abort(
2661 TX_THREAD *thread_ptr -> param_0
2662 ); */
_txm_module_manager_tx_thread_wait_abort_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2663 static ALIGN_TYPE _txm_module_manager_tx_thread_wait_abort_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2664 {
2665
2666 ALIGN_TYPE return_value;
2667
2668 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2669 {
2670 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
2671 return(TXM_MODULE_INVALID_MEMORY);
2672 }
2673
2674 return_value = (ALIGN_TYPE) _txe_thread_wait_abort(
2675 (TX_THREAD *) param_0
2676 );
2677 return(return_value);
2678 }
2679 #endif
2680
2681 #ifndef TXM_TIME_GET_CALL_NOT_USED
2682 /* ULONG _tx_time_get(); */
_txm_module_manager_tx_time_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2683 static ALIGN_TYPE _txm_module_manager_tx_time_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2684 {
2685
2686 ALIGN_TYPE return_value;
2687
2688 return_value = (ALIGN_TYPE) _tx_time_get();
2689 return(return_value);
2690 }
2691 #endif
2692
2693 #ifndef TXM_TIME_SET_CALL_NOT_USED
2694 /* VOID _tx_time_set(
2695 ULONG new_time -> param_0
2696 ); */
_txm_module_manager_tx_time_set_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2697 static ALIGN_TYPE _txm_module_manager_tx_time_set_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2698 {
2699
2700 _tx_time_set(
2701 (ULONG) param_0
2702 );
2703 return(TX_SUCCESS);
2704 }
2705 #endif
2706
2707 #ifndef TXM_TIMER_ACTIVATE_CALL_NOT_USED
2708 /* UINT _txe_timer_activate(
2709 TX_TIMER *timer_ptr -> param_0
2710 ); */
_txm_module_manager_tx_timer_activate_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2711 static ALIGN_TYPE _txm_module_manager_tx_timer_activate_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2712 {
2713
2714 ALIGN_TYPE return_value;
2715
2716 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2717 {
2718 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER)))
2719 return(TXM_MODULE_INVALID_MEMORY);
2720 }
2721
2722 return_value = (ALIGN_TYPE) _txe_timer_activate(
2723 (TX_TIMER *) param_0
2724 );
2725 return(return_value);
2726 }
2727 #endif
2728
2729 #ifndef TXM_TIMER_CHANGE_CALL_NOT_USED
2730 /* UINT _txe_timer_change(
2731 TX_TIMER *timer_ptr, -> param_0
2732 ULONG initial_ticks, -> param_1
2733 ULONG reschedule_ticks -> param_2
2734 ); */
_txm_module_manager_tx_timer_change_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)2735 static ALIGN_TYPE _txm_module_manager_tx_timer_change_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
2736 {
2737
2738 ALIGN_TYPE return_value;
2739
2740 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2741 {
2742 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER)))
2743 return(TXM_MODULE_INVALID_MEMORY);
2744 }
2745
2746 return_value = (ALIGN_TYPE) _txe_timer_change(
2747 (TX_TIMER *) param_0,
2748 (ULONG) param_1,
2749 (ULONG) param_2
2750 );
2751 return(return_value);
2752 }
2753 #endif
2754
2755 #ifndef TXM_TIMER_CREATE_CALL_NOT_USED
2756 /* UINT _txe_timer_create(
2757 TX_TIMER *timer_ptr, -> param_0
2758 CHAR *name_ptr, -> param_1
2759 VOID (*expiration_function)(ULONG), -> extra_parameters[0]
2760 ULONG expiration_input, -> extra_parameters[1]
2761 ULONG initial_ticks, -> extra_parameters[2]
2762 ULONG reschedule_ticks, -> extra_parameters[3]
2763 UINT auto_activate, -> extra_parameters[4]
2764 UINT timer_control_block_size -> extra_parameters[5]
2765 ); */
_txm_module_manager_tx_timer_create_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2766 static ALIGN_TYPE _txm_module_manager_tx_timer_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2767 {
2768
2769 ALIGN_TYPE return_value;
2770 TX_TIMER *timer_ptr;
2771 VOID (*expiration_function)(ULONG);
2772
2773 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2774 {
2775 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, param_0, sizeof(TX_TIMER)))
2776 return(TXM_MODULE_INVALID_MEMORY);
2777
2778 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
2779 return(TXM_MODULE_INVALID_MEMORY);
2780
2781 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[6])))
2782 return(TXM_MODULE_INVALID_MEMORY);
2783 }
2784
2785 /* Is it a disable request? */
2786 if ((void *) extra_parameters[0] == TX_NULL)
2787 {
2788
2789 /* Clear the callback. */
2790 expiration_function = (VOID (*)(ULONG)) TX_NULL;
2791 }
2792 else
2793 {
2794
2795 /* Set trampoline callback. */
2796 expiration_function = _txm_module_manager_timer_notify_trampoline;
2797 }
2798
2799 return_value = (ALIGN_TYPE) _txe_timer_create(
2800 (TX_TIMER *) param_0,
2801 (CHAR *) param_1,
2802 (VOID (*)(ULONG)) expiration_function,
2803 (ULONG) extra_parameters[1],
2804 (ULONG) extra_parameters[2],
2805 (ULONG) extra_parameters[3],
2806 (UINT) extra_parameters[4],
2807 (UINT) extra_parameters[5]
2808 );
2809
2810 if (return_value == TX_SUCCESS)
2811 {
2812
2813 /* Get the object pointer. */
2814 timer_ptr = (TX_TIMER *) param_0;
2815
2816 /* Setup trampoline values. */
2817 if ((void *) extra_parameters[0] != TX_NULL)
2818 {
2819
2820 timer_ptr -> tx_timer_module_instance = (VOID *) module_instance;
2821 timer_ptr -> tx_timer_module_expiration_function = (VOID (*)(ULONG)) extra_parameters[0];
2822 }
2823 }
2824 return(return_value);
2825 }
2826 #endif
2827
2828 #ifndef TXM_TIMER_DEACTIVATE_CALL_NOT_USED
2829 /* UINT _txe_timer_deactivate(
2830 TX_TIMER *timer_ptr -> param_0
2831 ); */
_txm_module_manager_tx_timer_deactivate_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2832 static ALIGN_TYPE _txm_module_manager_tx_timer_deactivate_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2833 {
2834
2835 ALIGN_TYPE return_value;
2836
2837 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2838 {
2839 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER)))
2840 return(TXM_MODULE_INVALID_MEMORY);
2841 }
2842
2843 return_value = (ALIGN_TYPE) _txe_timer_deactivate(
2844 (TX_TIMER *) param_0
2845 );
2846 return(return_value);
2847 }
2848 #endif
2849
2850 #ifndef TXM_TIMER_DELETE_CALL_NOT_USED
2851 /* UINT _txe_timer_delete(
2852 TX_TIMER *timer_ptr -> param_0
2853 ); */
_txm_module_manager_tx_timer_delete_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)2854 static ALIGN_TYPE _txm_module_manager_tx_timer_delete_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
2855 {
2856
2857 ALIGN_TYPE return_value;
2858
2859 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2860 {
2861 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER)))
2862 return(TXM_MODULE_INVALID_MEMORY);
2863 }
2864
2865 return_value = (ALIGN_TYPE) _txe_timer_delete(
2866 (TX_TIMER *) param_0
2867 );
2868
2869 /* Deallocate object memory. */
2870 if (return_value == TX_SUCCESS)
2871 {
2872 return_value = _txm_module_manager_object_deallocate((VOID *) param_0);
2873 }
2874 return(return_value);
2875 }
2876 #endif
2877
2878 #ifndef TXM_TIMER_INFO_GET_CALL_NOT_USED
2879 /* UINT _txe_timer_info_get(
2880 TX_TIMER *timer_ptr, -> param_0
2881 CHAR **name, -> param_1
2882 UINT *active, -> extra_parameters[0]
2883 ULONG *remaining_ticks, -> extra_parameters[1]
2884 ULONG *reschedule_ticks, -> extra_parameters[2]
2885 TX_TIMER **next_timer -> extra_parameters[3]
2886 ); */
_txm_module_manager_tx_timer_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2887 static ALIGN_TYPE _txm_module_manager_tx_timer_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2888 {
2889
2890 ALIGN_TYPE return_value;
2891
2892 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2893 {
2894 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER)))
2895 return(TXM_MODULE_INVALID_MEMORY);
2896
2897 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *)))
2898 return(TXM_MODULE_INVALID_MEMORY);
2899
2900 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[4])))
2901 return(TXM_MODULE_INVALID_MEMORY);
2902
2903 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(UINT)))
2904 return(TXM_MODULE_INVALID_MEMORY);
2905
2906 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
2907 return(TXM_MODULE_INVALID_MEMORY);
2908
2909 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
2910 return(TXM_MODULE_INVALID_MEMORY);
2911
2912 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(TX_TIMER *)))
2913 return(TXM_MODULE_INVALID_MEMORY);
2914 }
2915
2916 return_value = (ALIGN_TYPE) _txe_timer_info_get(
2917 (TX_TIMER *) param_0,
2918 (CHAR **) param_1,
2919 (UINT *) extra_parameters[0],
2920 (ULONG *) extra_parameters[1],
2921 (ULONG *) extra_parameters[2],
2922 (TX_TIMER **) extra_parameters[3]
2923 );
2924 return(return_value);
2925 }
2926 #endif
2927
2928 #ifndef TXM_TIMER_PERFORMANCE_INFO_GET_CALL_NOT_USED
2929 /* UINT _tx_timer_performance_info_get(
2930 TX_TIMER *timer_ptr, -> param_0
2931 ULONG *activates, -> param_1
2932 ULONG *reactivates, -> extra_parameters[0]
2933 ULONG *deactivates, -> extra_parameters[1]
2934 ULONG *expirations, -> extra_parameters[2]
2935 ULONG *expiration_adjusts -> extra_parameters[3]
2936 ); */
_txm_module_manager_tx_timer_performance_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2937 static ALIGN_TYPE _txm_module_manager_tx_timer_performance_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2938 {
2939
2940 ALIGN_TYPE return_value;
2941
2942 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2943 {
2944 if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER)))
2945 return(TXM_MODULE_INVALID_MEMORY);
2946
2947 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
2948 return(TXM_MODULE_INVALID_MEMORY);
2949
2950 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[4])))
2951 return(TXM_MODULE_INVALID_MEMORY);
2952
2953 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
2954 return(TXM_MODULE_INVALID_MEMORY);
2955
2956 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
2957 return(TXM_MODULE_INVALID_MEMORY);
2958
2959 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
2960 return(TXM_MODULE_INVALID_MEMORY);
2961
2962 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[3], sizeof(ULONG)))
2963 return(TXM_MODULE_INVALID_MEMORY);
2964 }
2965
2966 return_value = (ALIGN_TYPE) _tx_timer_performance_info_get(
2967 (TX_TIMER *) param_0,
2968 (ULONG *) param_1,
2969 (ULONG *) extra_parameters[0],
2970 (ULONG *) extra_parameters[1],
2971 (ULONG *) extra_parameters[2],
2972 (ULONG *) extra_parameters[3]
2973 );
2974 return(return_value);
2975 }
2976 #endif
2977
2978 #ifndef TXM_TIMER_PERFORMANCE_SYSTEM_INFO_GET_CALL_NOT_USED
2979 /* UINT _tx_timer_performance_system_info_get(
2980 ULONG *activates, -> param_0
2981 ULONG *reactivates, -> param_1
2982 ULONG *deactivates, -> extra_parameters[0]
2983 ULONG *expirations, -> extra_parameters[1]
2984 ULONG *expiration_adjusts -> extra_parameters[2]
2985 ); */
_txm_module_manager_tx_timer_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)2986 static ALIGN_TYPE _txm_module_manager_tx_timer_performance_system_info_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
2987 {
2988
2989 ALIGN_TYPE return_value;
2990
2991 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
2992 {
2993 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_0, sizeof(ULONG)))
2994 return(TXM_MODULE_INVALID_MEMORY);
2995
2996 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG)))
2997 return(TXM_MODULE_INVALID_MEMORY);
2998
2999 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[3])))
3000 return(TXM_MODULE_INVALID_MEMORY);
3001
3002 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[0], sizeof(ULONG)))
3003 return(TXM_MODULE_INVALID_MEMORY);
3004
3005 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG)))
3006 return(TXM_MODULE_INVALID_MEMORY);
3007
3008 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[2], sizeof(ULONG)))
3009 return(TXM_MODULE_INVALID_MEMORY);
3010 }
3011
3012 return_value = (ALIGN_TYPE) _tx_timer_performance_system_info_get(
3013 (ULONG *) param_0,
3014 (ULONG *) param_1,
3015 (ULONG *) extra_parameters[0],
3016 (ULONG *) extra_parameters[1],
3017 (ULONG *) extra_parameters[2]
3018 );
3019 return(return_value);
3020 }
3021 #endif
3022
3023 #ifndef TXM_TRACE_BUFFER_FULL_NOTIFY_CALL_NOT_USED
3024 /* UINT _tx_trace_buffer_full_notify(
3025 VOID (*full_buffer_callback)(VOID *buffer) -> param_0
3026 ); */
_txm_module_manager_tx_trace_buffer_full_notify_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)3027 static ALIGN_TYPE _txm_module_manager_tx_trace_buffer_full_notify_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
3028 {
3029
3030 ALIGN_TYPE return_value;
3031
3032 return_value = (ALIGN_TYPE) _tx_trace_buffer_full_notify(
3033 (VOID (*)(VOID *buffer)) param_0
3034 );
3035 return(return_value);
3036 }
3037 #endif
3038
3039 #ifndef TXM_TRACE_DISABLE_CALL_NOT_USED
3040 /* UINT _tx_trace_disable(); */
_txm_module_manager_tx_trace_disable_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)3041 static ALIGN_TYPE _txm_module_manager_tx_trace_disable_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
3042 {
3043
3044 ALIGN_TYPE return_value;
3045
3046 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_USER_MODE)
3047 return(TXM_MODULE_INVALID_PROPERTIES);
3048
3049 return_value = (ALIGN_TYPE) _tx_trace_disable();
3050 return(return_value);
3051 }
3052 #endif
3053
3054 #ifndef TXM_TRACE_ENABLE_CALL_NOT_USED
3055 /* UINT _tx_trace_enable(
3056 VOID *trace_buffer_start, -> param_0
3057 ULONG trace_buffer_size, -> param_1
3058 ULONG registry_entries -> param_2
3059 ); */
_txm_module_manager_tx_trace_enable_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)3060 static ALIGN_TYPE _txm_module_manager_tx_trace_enable_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
3061 {
3062
3063 ALIGN_TYPE return_value;
3064
3065 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_USER_MODE)
3066 return(TXM_MODULE_INVALID_PROPERTIES);
3067
3068 return_value = (ALIGN_TYPE) _tx_trace_enable(
3069 (VOID *) param_0,
3070 (ULONG) param_1,
3071 (ULONG) param_2
3072 );
3073 return(return_value);
3074 }
3075 #endif
3076
3077 #ifndef TXM_TRACE_EVENT_FILTER_CALL_NOT_USED
3078 /* UINT _tx_trace_event_filter(
3079 ULONG event_filter_bits -> param_0
3080 ); */
_txm_module_manager_tx_trace_event_filter_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)3081 static ALIGN_TYPE _txm_module_manager_tx_trace_event_filter_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
3082 {
3083
3084 ALIGN_TYPE return_value;
3085
3086 return_value = (ALIGN_TYPE) _tx_trace_event_filter(
3087 (ULONG) param_0
3088 );
3089 return(return_value);
3090 }
3091 #endif
3092
3093 #ifndef TXM_TRACE_EVENT_UNFILTER_CALL_NOT_USED
3094 /* UINT _tx_trace_event_unfilter(
3095 ULONG event_unfilter_bits -> param_0
3096 ); */
_txm_module_manager_tx_trace_event_unfilter_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)3097 static ALIGN_TYPE _txm_module_manager_tx_trace_event_unfilter_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
3098 {
3099
3100 ALIGN_TYPE return_value;
3101
3102 return_value = (ALIGN_TYPE) _tx_trace_event_unfilter(
3103 (ULONG) param_0
3104 );
3105 return(return_value);
3106 }
3107 #endif
3108
3109 #ifndef TXM_TRACE_INTERRUPT_CONTROL_CALL_NOT_USED
3110 /* UINT _tx_trace_interrupt_control(
3111 UINT new_posture -> param_0
3112 ); */
_txm_module_manager_tx_trace_interrupt_control_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)3113 static ALIGN_TYPE _txm_module_manager_tx_trace_interrupt_control_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
3114 {
3115
3116 ALIGN_TYPE return_value;
3117
3118 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_USER_MODE)
3119 return(TXM_MODULE_INVALID_PROPERTIES);
3120
3121 return_value = (ALIGN_TYPE) _tx_trace_interrupt_control(
3122 (UINT) param_0
3123 );
3124 return(return_value);
3125 }
3126 #endif
3127
3128 #ifndef TXM_TRACE_ISR_ENTER_INSERT_CALL_NOT_USED
3129 /* VOID _tx_trace_isr_enter_insert(
3130 ULONG isr_id -> param_0
3131 ); */
_txm_module_manager_tx_trace_isr_enter_insert_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)3132 static ALIGN_TYPE _txm_module_manager_tx_trace_isr_enter_insert_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
3133 {
3134
3135 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_USER_MODE)
3136 return(TXM_MODULE_INVALID_PROPERTIES);
3137
3138 _tx_trace_isr_enter_insert(
3139 (ULONG) param_0
3140 );
3141 return(TX_SUCCESS);
3142 }
3143 #endif
3144
3145 #ifndef TXM_TRACE_ISR_EXIT_INSERT_CALL_NOT_USED
3146 /* VOID _tx_trace_isr_exit_insert(
3147 ULONG isr_id -> param_0
3148 ); */
_txm_module_manager_tx_trace_isr_exit_insert_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)3149 static ALIGN_TYPE _txm_module_manager_tx_trace_isr_exit_insert_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
3150 {
3151
3152 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_USER_MODE)
3153 return(TXM_MODULE_INVALID_PROPERTIES);
3154
3155 _tx_trace_isr_exit_insert(
3156 (ULONG) param_0
3157 );
3158 return(TX_SUCCESS);
3159 }
3160 #endif
3161
3162 #ifndef TXM_TRACE_USER_EVENT_INSERT_CALL_NOT_USED
3163 /* UINT _tx_trace_user_event_insert(
3164 ULONG event_id, -> param_0
3165 ULONG info_field_1, -> param_1
3166 ULONG info_field_2, -> extra_parameters[0]
3167 ULONG info_field_3, -> extra_parameters[1]
3168 ULONG info_field_4 -> extra_parameters[2]
3169 ); */
_txm_module_manager_tx_trace_user_event_insert_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)3170 static ALIGN_TYPE _txm_module_manager_tx_trace_user_event_insert_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
3171 {
3172
3173 ALIGN_TYPE return_value;
3174
3175 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
3176 {
3177 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[3])))
3178 return(TXM_MODULE_INVALID_MEMORY);
3179 }
3180
3181 return_value = (ALIGN_TYPE) _tx_trace_user_event_insert(
3182 (ULONG) param_0,
3183 (ULONG) param_1,
3184 (ULONG) extra_parameters[0],
3185 (ULONG) extra_parameters[1],
3186 (ULONG) extra_parameters[2]
3187 );
3188 return(return_value);
3189 }
3190 #endif
3191
3192 #ifndef TXM_MODULE_OBJECT_ALLOCATE_CALL_NOT_USED
3193 /* UINT _txm_module_object_allocate(
3194 VOID **object_ptr, -> param_0
3195 ULONG object_size -> param_1
3196 ); */
_txm_module_manager_txm_module_object_allocate_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1)3197 static ALIGN_TYPE _txm_module_manager_txm_module_object_allocate_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1)
3198 {
3199
3200 ALIGN_TYPE return_value;
3201
3202 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
3203 {
3204 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_0, sizeof(VOID *)))
3205 return(TXM_MODULE_INVALID_MEMORY);
3206 }
3207
3208 return_value = (ALIGN_TYPE) _txm_module_manager_object_allocate(
3209 (VOID **) param_0,
3210 (ULONG) param_1,
3211 module_instance
3212 );
3213 return(return_value);
3214 }
3215 #endif
3216
3217 #ifndef TXM_MODULE_OBJECT_DEALLOCATE_CALL_NOT_USED
3218 /* UINT _txm_module_object_deallocate(
3219 VOID *object_ptr -> param_0
3220 ); */
_txm_module_manager_txm_module_object_deallocate_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0)3221 static ALIGN_TYPE _txm_module_manager_txm_module_object_deallocate_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0)
3222 {
3223
3224 ALIGN_TYPE return_value;
3225 TXM_MODULE_ALLOCATED_OBJECT *object_ptr;
3226 ALIGN_TYPE object_end;
3227 ALIGN_TYPE object_pool_end;
3228
3229 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
3230 {
3231 /* Is the object pool created? */
3232 if (_txm_module_manager_object_pool_created == TX_TRUE)
3233 {
3234
3235 /* Get the module allocated object. */
3236 object_ptr = ((TXM_MODULE_ALLOCATED_OBJECT *) param_0) - 1;
3237
3238 /* Get the end address of the object pool. */
3239 object_pool_end = (ALIGN_TYPE) (_txm_module_manager_object_pool.tx_byte_pool_start + _txm_module_manager_object_pool.tx_byte_pool_size);
3240
3241 /* Check that the pointer is in the object pool. */
3242 if ((ALIGN_TYPE) object_ptr < (ALIGN_TYPE) _txm_module_manager_object_pool.tx_byte_pool_start ||
3243 (ALIGN_TYPE) object_ptr >= (ALIGN_TYPE) object_pool_end)
3244 {
3245 /* Pointer is outside of the object pool. */
3246 return(TXM_MODULE_INVALID_MEMORY);
3247 }
3248
3249 /* Get the end addresses of the object. */
3250 object_end = ((ALIGN_TYPE) object_ptr) + sizeof(TXM_MODULE_ALLOCATED_OBJECT) + object_ptr -> txm_module_object_size;
3251
3252 /* Check that the object is in the object pool. */
3253 if (object_end >= object_pool_end)
3254 {
3255 /* Object is outside of the object pool. */
3256 return(TXM_MODULE_INVALID_MEMORY);
3257 }
3258 }
3259 }
3260
3261 return_value = (ALIGN_TYPE) _txm_module_manager_object_deallocate(
3262 (VOID *) param_0
3263 );
3264 return(return_value);
3265 }
3266 #endif
3267
3268 #ifndef TXM_MODULE_OBJECT_POINTER_GET_CALL_NOT_USED
3269 /* UINT _txm_module_object_pointer_get(
3270 UINT object_type, -> param_0
3271 CHAR *name, -> param_1
3272 VOID **object_ptr -> param_2
3273 ); */
_txm_module_manager_txm_module_object_pointer_get_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE param_2)3274 static ALIGN_TYPE _txm_module_manager_txm_module_object_pointer_get_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
3275 {
3276
3277 ALIGN_TYPE return_value;
3278
3279 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
3280 {
3281 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
3282 return(TXM_MODULE_INVALID_MEMORY);
3283
3284 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_2, sizeof(VOID *)))
3285 return(TXM_MODULE_INVALID_MEMORY);
3286 }
3287
3288 return_value = (ALIGN_TYPE) _txm_module_manager_object_pointer_get(
3289 (UINT) param_0,
3290 (CHAR *) param_1,
3291 (VOID **) param_2
3292 );
3293 return(return_value);
3294 }
3295 #endif
3296
3297 #ifndef TXM_MODULE_OBJECT_POINTER_GET_EXTENDED_CALL_NOT_USED
3298 /* UINT _txm_module_object_pointer_get_extended(
3299 UINT object_type, -> param_0
3300 CHAR *name, -> param_1
3301 UINT name_length, -> extra_parameters[0]
3302 VOID **object_ptr -> extra_parameters[1]
3303 ); */
_txm_module_manager_txm_module_object_pointer_get_extended_dispatch(TXM_MODULE_INSTANCE * module_instance,ALIGN_TYPE param_0,ALIGN_TYPE param_1,ALIGN_TYPE * extra_parameters)3304 static ALIGN_TYPE _txm_module_manager_txm_module_object_pointer_get_extended_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE *extra_parameters)
3305 {
3306
3307 ALIGN_TYPE return_value;
3308
3309 if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
3310 {
3311 if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1))
3312 return(TXM_MODULE_INVALID_MEMORY);
3313
3314 if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2])))
3315 return(TXM_MODULE_INVALID_MEMORY);
3316
3317 if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(VOID *)))
3318 return(TXM_MODULE_INVALID_MEMORY);
3319 }
3320
3321 return_value = (ALIGN_TYPE) _txm_module_manager_object_pointer_get_extended(
3322 (UINT) param_0,
3323 (CHAR *) param_1,
3324 (UINT) extra_parameters[0],
3325 (VOID **) extra_parameters[1]
3326 );
3327 return(return_value);
3328 }
3329 #endif
3330