1 /***************************************************************************
2 * Copyright (c) 2024 Microsoft Corporation
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the MIT License which is available at
6 * https://opensource.org/licenses/MIT.
7 *
8 * SPDX-License-Identifier: MIT
9 **************************************************************************/
10
11
12 /**************************************************************************/
13 /**************************************************************************/
14 /** */
15 /** ThreadX Component */
16 /** */
17 /** Module */
18 /** */
19 /**************************************************************************/
20 /**************************************************************************/
21
22 #define TXM_MODULE
23 #include "txm_module.h"
24 #ifndef TXM_QUEUE_INFO_GET_CALL_NOT_USED
25 /**************************************************************************/
26 /* */
27 /* FUNCTION RELEASE */
28 /* */
29 /* _txe_queue_info_get PORTABLE C */
30 /* 6.1.10 */
31 /* AUTHOR */
32 /* */
33 /* Scott Larson, Microsoft Corporation */
34 /* */
35 /* DESCRIPTION */
36 /* */
37 /* This function checks for errors in the queue information get */
38 /* service. */
39 /* */
40 /* INPUT */
41 /* */
42 /* queue_ptr Pointer to queue control block */
43 /* name Destination for the queue name */
44 /* enqueued Destination for enqueued count */
45 /* available_storage Destination for available storage */
46 /* first_suspended Destination for pointer of first */
47 /* thread suspended on this queue */
48 /* suspended_count Destination for suspended count */
49 /* next_queue Destination for pointer to next */
50 /* queue on the created list */
51 /* */
52 /* OUTPUT */
53 /* */
54 /* TX_QUEUE_ERROR Invalid queue pointer */
55 /* status Completion status */
56 /* */
57 /* CALLS */
58 /* */
59 /* _txm_module_kernel_call_dispatcher */
60 /* */
61 /* CALLED BY */
62 /* */
63 /* Module application code */
64 /* */
65 /* RELEASE HISTORY */
66 /* */
67 /* DATE NAME DESCRIPTION */
68 /* */
69 /* 09-30-2020 Scott Larson Initial Version 6.1 */
70 /* 01-31-2022 Scott Larson Modified comments and added */
71 /* CALL_NOT_USED option, */
72 /* resulting in version 6.1.10 */
73 /* */
74 /**************************************************************************/
_txe_queue_info_get(TX_QUEUE * queue_ptr,CHAR ** name,ULONG * enqueued,ULONG * available_storage,TX_THREAD ** first_suspended,ULONG * suspended_count,TX_QUEUE ** next_queue)75 UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue)
76 {
77
78 UINT return_value;
79 ALIGN_TYPE extra_parameters[5];
80
81 extra_parameters[0] = (ALIGN_TYPE) enqueued;
82 extra_parameters[1] = (ALIGN_TYPE) available_storage;
83 extra_parameters[2] = (ALIGN_TYPE) first_suspended;
84 extra_parameters[3] = (ALIGN_TYPE) suspended_count;
85 extra_parameters[4] = (ALIGN_TYPE) next_queue;
86
87 /* Call module manager dispatcher. */
88 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_INFO_GET_CALL, (ALIGN_TYPE) queue_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
89
90 /* Return value to the caller. */
91 return(return_value);
92 }
93 #endif
94