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 /** FileX Component                                                       */
16 /**                                                                       */
17 /**   Trace                                                               */
18 /**                                                                       */
19 /**************************************************************************/
20 /**************************************************************************/
21 
22 #ifndef TX_SOURCE_CODE
23 #define TX_SOURCE_CODE
24 #endif
25 
26 #ifndef FX_SOURCE_CODE
27 #define FX_SOURCE_CODE
28 #endif
29 
30 #include "fx_api.h"
31 
32 #ifdef TX_ENABLE_EVENT_TRACE
33 
34 
35 /* Include necessary system files.  */
36 
37 
38 
39 /**************************************************************************/
40 /*                                                                        */
41 /*  FUNCTION                                               RELEASE        */
42 /*                                                                        */
43 /*    _fx_trace_object_register                           PORTABLE C      */
44 /*                                                           6.1          */
45 /*  AUTHOR                                                                */
46 /*                                                                        */
47 /*    William E. Lamie, Microsoft Corporation                             */
48 /*                                                                        */
49 /*  DESCRIPTION                                                           */
50 /*                                                                        */
51 /*    This function registers a FileX object in the trace registry.       */
52 /*                                                                        */
53 /*  INPUT                                                                 */
54 /*                                                                        */
55 /*    object_type                           Type of system object         */
56 /*    object_ptr                            Address of system object      */
57 /*    object_name                           Name of system object         */
58 /*    parameter_1                           Supplemental parameter 1      */
59 /*    parameter_2                           Supplemental parameter 2      */
60 /*                                                                        */
61 /*  OUTPUT                                                                */
62 /*                                                                        */
63 /*    None                                                                */
64 /*                                                                        */
65 /*  CALLS                                                                 */
66 /*                                                                        */
67 /*    _tx_trace_object_register             Actual register function      */
68 /*                                                                        */
69 /*  CALLED BY                                                             */
70 /*                                                                        */
71 /*    Application Initialization                                          */
72 /*                                                                        */
73 /*  RELEASE HISTORY                                                       */
74 /*                                                                        */
75 /*    DATE              NAME                      DESCRIPTION             */
76 /*                                                                        */
77 /*  05-19-2020     William E. Lamie         Initial Version 6.0           */
78 /*  09-30-2020     William E. Lamie         Modified comment(s),          */
79 /*                                            resulting in version 6.1    */
80 /*                                                                        */
81 /**************************************************************************/
_fx_trace_object_register(UCHAR object_type,VOID * object_ptr,CHAR * object_name,ULONG parameter_1,ULONG parameter_2)82 VOID  _fx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2)
83 {
84 
85 TX_INTERRUPT_SAVE_AREA
86 
87 
88     /* Disable interrupts.  */
89     TX_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     TX_RESTORE
96 }
97 #endif
98 
99