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 */
19 /** */
20 /**************************************************************************/
21 /**************************************************************************/
22
23 #define TXM_MODULE
24 #include "txm_module.h"
25 #ifndef TXM_BYTE_POOL_INFO_GET_CALL_NOT_USED
26 /**************************************************************************/
27 /* */
28 /* FUNCTION RELEASE */
29 /* */
30 /* _txe_byte_pool_info_get PORTABLE C */
31 /* 6.1.10 */
32 /* AUTHOR */
33 /* */
34 /* Scott Larson, Microsoft Corporation */
35 /* */
36 /* DESCRIPTION */
37 /* */
38 /* This function checks for errors in the byte pool information get */
39 /* service. */
40 /* */
41 /* INPUT */
42 /* */
43 /* pool_ptr Pointer to byte pool control block*/
44 /* name Destination for the pool name */
45 /* available_bytes Number of free bytes in byte pool */
46 /* fragments Number of fragments in byte pool */
47 /* first_suspended Destination for pointer of first */
48 /* thread suspended on byte pool */
49 /* suspended_count Destination for suspended count */
50 /* next_pool Destination for pointer to next */
51 /* byte pool on the created list */
52 /* */
53 /* OUTPUT */
54 /* */
55 /* TX_POOL_ERROR Invalid byte pool pointer */
56 /* status Completion status */
57 /* */
58 /* CALLS */
59 /* */
60 /* _txm_module_kernel_call_dispatcher */
61 /* */
62 /* CALLED BY */
63 /* */
64 /* Module application code */
65 /* */
66 /* RELEASE HISTORY */
67 /* */
68 /* DATE NAME DESCRIPTION */
69 /* */
70 /* 09-30-2020 Scott Larson Initial Version 6.1 */
71 /* 01-31-2022 Scott Larson Modified comments and added */
72 /* CALL_NOT_USED option, */
73 /* resulting in version 6.1.10 */
74 /* */
75 /**************************************************************************/
_txe_byte_pool_info_get(TX_BYTE_POOL * pool_ptr,CHAR ** name,ULONG * available_bytes,ULONG * fragments,TX_THREAD ** first_suspended,ULONG * suspended_count,TX_BYTE_POOL ** next_pool)76 UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool)
77 {
78
79 UINT return_value;
80 ALIGN_TYPE extra_parameters[5];
81
82 extra_parameters[0] = (ALIGN_TYPE) available_bytes;
83 extra_parameters[1] = (ALIGN_TYPE) fragments;
84 extra_parameters[2] = (ALIGN_TYPE) first_suspended;
85 extra_parameters[3] = (ALIGN_TYPE) suspended_count;
86 extra_parameters[4] = (ALIGN_TYPE) next_pool;
87
88 /* Call module manager dispatcher. */
89 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_POOL_INFO_GET_CALL, (ALIGN_TYPE) pool_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
90
91 /* Return value to the caller. */
92 return(return_value);
93 }
94 #endif
95