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_MUTEX_PERFORMANCE_INFO_GET_CALL_NOT_USED
26 /**************************************************************************/
27 /* */
28 /* FUNCTION RELEASE */
29 /* */
30 /* _tx_mutex_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 /* mutex. */
40 /* */
41 /* INPUT */
42 /* */
43 /* mutex_ptr Pointer to mutex control block */
44 /* puts Destination for the number of */
45 /* puts on to this mutex */
46 /* gets Destination for the number of */
47 /* gets on this mutex */
48 /* suspensions Destination for the number of */
49 /* suspensions on this mutex */
50 /* timeouts Destination for number of timeouts*/
51 /* on this mutex */
52 /* inversions Destination for number of priority*/
53 /* inversions on this mutex */
54 /* inheritances Destination for number of priority*/
55 /* inheritances on this mutex */
56 /* */
57 /* OUTPUT */
58 /* */
59 /* status Completion status */
60 /* */
61 /* CALLS */
62 /* */
63 /* _txm_module_kernel_call_dispatcher */
64 /* */
65 /* CALLED BY */
66 /* */
67 /* Module application code */
68 /* */
69 /* RELEASE HISTORY */
70 /* */
71 /* DATE NAME DESCRIPTION */
72 /* */
73 /* 09-30-2020 Scott Larson Initial Version 6.1 */
74 /* 01-31-2022 Scott Larson Modified comments and added */
75 /* CALL_NOT_USED option, */
76 /* resulting in version 6.1.10 */
77 /* */
78 /**************************************************************************/
_tx_mutex_performance_info_get(TX_MUTEX * mutex_ptr,ULONG * puts,ULONG * gets,ULONG * suspensions,ULONG * timeouts,ULONG * inversions,ULONG * inheritances)79 UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts, ULONG *inversions, ULONG *inheritances)
80 {
81
82 UINT return_value;
83 ALIGN_TYPE extra_parameters[5];
84
85 extra_parameters[0] = (ALIGN_TYPE) gets;
86 extra_parameters[1] = (ALIGN_TYPE) suspensions;
87 extra_parameters[2] = (ALIGN_TYPE) timeouts;
88 extra_parameters[3] = (ALIGN_TYPE) inversions;
89 extra_parameters[4] = (ALIGN_TYPE) inheritances;
90
91 /* Call module manager dispatcher. */
92 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MUTEX_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) mutex_ptr, (ALIGN_TYPE) puts, (ALIGN_TYPE) extra_parameters);
93
94 /* Return value to the caller. */
95 return(return_value);
96 }
97 #endif
98