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 /** USBX Component */
16 /** */
17 /** Trace */
18 /** */
19 /**************************************************************************/
20 /**************************************************************************/
21
22 #ifndef UX_SOURCE_CODE
23 #define UX_SOURCE_CODE
24 #endif
25
26
27 /* Include necessary system files. */
28
29 #include "ux_api.h"
30
31 #ifdef UX_ENABLE_EVENT_TRACE
32 extern VOID _tx_trace_object_register(UCHAR , VOID *, CHAR *, ULONG , ULONG );
33 /**************************************************************************/
34 /* */
35 /* FUNCTION RELEASE */
36 /* */
37 /* _ux_trace_object_register PORTABLE C */
38 /* 6.1.9 */
39 /* AUTHOR */
40 /* */
41 /* Chaoqiong Xiao, Microsoft Corporation */
42 /* */
43 /* DESCRIPTION */
44 /* */
45 /* This function registers a USBX object in the trace registry. */
46 /* */
47 /* INPUT */
48 /* */
49 /* object_type Type of system object */
50 /* object_ptr Address of system object */
51 /* object_name Name of system object */
52 /* parameter_1 Supplemental parameter 1 */
53 /* parameter_2 Supplemental parameter 2 */
54 /* */
55 /* OUTPUT */
56 /* */
57 /* None */
58 /* */
59 /* CALLS */
60 /* */
61 /* _tx_trace_object_register Actual register function */
62 /* */
63 /* CALLED BY */
64 /* */
65 /* Application Initialization */
66 /* */
67 /* RELEASE HISTORY */
68 /* */
69 /* DATE NAME DESCRIPTION */
70 /* */
71 /* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
72 /* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
73 /* used UX prefix to refer to */
74 /* TX symbols instead of using */
75 /* them directly, */
76 /* resulting in version 6.1 */
77 /* 10-15-2021 Chaoqiong Xiao Modified comment(s), */
78 /* improved traceX support, */
79 /* resulting in version 6.1.9 */
80 /* */
81 /**************************************************************************/
_ux_trace_object_register(UCHAR object_type,VOID * object_ptr,CHAR * object_name,ULONG parameter_1,ULONG parameter_2)82 VOID _ux_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2)
83 {
84
85 UX_INTERRUPT_SAVE_AREA
86
87
88 /* Disable interrupts. */
89 UX_DISABLE
90
91 /* Call actual object register function. */
92 _tx_trace_object_register(object_type, object_ptr, object_name, parameter_1, parameter_2);
93
94 /* Restore interrupts. */
95 UX_RESTORE
96 }
97 #endif
98
99