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_QUEUE_PERFORMANCE_INFO_GET_CALL_NOT_USED
26 /**************************************************************************/
27 /* */
28 /* FUNCTION RELEASE */
29 /* */
30 /* _tx_queue_performance_info_get PORTABLE C */
31 /* 6.1.10 */
32 /* AUTHOR */
33 /* */
34 /* Scott Larson, Microsoft Corporation */
35 /* */
36 /* DESCRIPTION */
37 /* */
38 /* This function retrieves performance information from the specified */
39 /* queue. */
40 /* */
41 /* INPUT */
42 /* */
43 /* queue_ptr Pointer to queue control block */
44 /* messages_sent Destination for messages sent */
45 /* messages_received Destination for messages received */
46 /* empty_suspensions Destination for number of empty */
47 /* queue suspensions */
48 /* full_suspensions Destination for number of full */
49 /* queue suspensions */
50 /* full_errors Destination for queue full errors */
51 /* returned - no suspension */
52 /* timeouts Destination for number of timeouts*/
53 /* on this queue */
54 /* */
55 /* OUTPUT */
56 /* */
57 /* status Completion status */
58 /* */
59 /* CALLS */
60 /* */
61 /* _txm_module_kernel_call_dispatcher */
62 /* */
63 /* CALLED BY */
64 /* */
65 /* Module application code */
66 /* */
67 /* RELEASE HISTORY */
68 /* */
69 /* DATE NAME DESCRIPTION */
70 /* */
71 /* 09-30-2020 Scott Larson Initial Version 6.1 */
72 /* 01-31-2022 Scott Larson Modified comments and added */
73 /* CALL_NOT_USED option, */
74 /* resulting in version 6.1.10 */
75 /* */
76 /**************************************************************************/
_tx_queue_performance_info_get(TX_QUEUE * queue_ptr,ULONG * messages_sent,ULONG * messages_received,ULONG * empty_suspensions,ULONG * full_suspensions,ULONG * full_errors,ULONG * timeouts)77 UINT _tx_queue_performance_info_get(TX_QUEUE *queue_ptr, ULONG *messages_sent, ULONG *messages_received, ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts)
78 {
79
80 UINT return_value;
81 ALIGN_TYPE extra_parameters[5];
82
83 extra_parameters[0] = (ALIGN_TYPE) messages_received;
84 extra_parameters[1] = (ALIGN_TYPE) empty_suspensions;
85 extra_parameters[2] = (ALIGN_TYPE) full_suspensions;
86 extra_parameters[3] = (ALIGN_TYPE) full_errors;
87 extra_parameters[4] = (ALIGN_TYPE) timeouts;
88
89 /* Call module manager dispatcher. */
90 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) queue_ptr, (ALIGN_TYPE) messages_sent, (ALIGN_TYPE) extra_parameters);
91
92 /* Return value to the caller. */
93 return(return_value);
94 }
95 #endif
96