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_TIMER_PERFORMANCE_INFO_GET_CALL_NOT_USED
25 /**************************************************************************/
26 /* */
27 /* FUNCTION RELEASE */
28 /* */
29 /* _tx_timer_performance_info_get PORTABLE C */
30 /* 6.1.10 */
31 /* AUTHOR */
32 /* */
33 /* Scott Larson, Microsoft Corporation */
34 /* */
35 /* DESCRIPTION */
36 /* */
37 /* This function retrieves performance information from the specified */
38 /* timer. */
39 /* */
40 /* INPUT */
41 /* */
42 /* timer_ptr Pointer to timer control block */
43 /* activates Destination for the number of */
44 /* activations of this timer */
45 /* reactivates Destination for the number of */
46 /* reactivations of this timer */
47 /* deactivates Destination for the number of */
48 /* deactivations of this timer */
49 /* expirations Destination for the number of */
50 /* expirations of this timer */
51 /* expiration_adjusts Destination for the number of */
52 /* expiration adjustments of this */
53 /* timer */
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_timer_performance_info_get(TX_TIMER * timer_ptr,ULONG * activates,ULONG * reactivates,ULONG * deactivates,ULONG * expirations,ULONG * expiration_adjusts)77 UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts)
78 {
79
80 UINT return_value;
81 ALIGN_TYPE extra_parameters[4];
82
83 extra_parameters[0] = (ALIGN_TYPE) reactivates;
84 extra_parameters[1] = (ALIGN_TYPE) deactivates;
85 extra_parameters[2] = (ALIGN_TYPE) expirations;
86 extra_parameters[3] = (ALIGN_TYPE) expiration_adjusts;
87
88 /* Call module manager dispatcher. */
89 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) timer_ptr, (ALIGN_TYPE) activates, (ALIGN_TYPE) extra_parameters);
90
91 /* Return value to the caller. */
92 return(return_value);
93 }
94 #endif
95