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_unregister(VOID *);
33 /**************************************************************************/
34 /*                                                                        */
35 /*  FUNCTION                                               RELEASE        */
36 /*                                                                        */
37 /*    _ux_trace_object_unregister                         PORTABLE C      */
38 /*                                                           6.1.9        */
39 /*  AUTHOR                                                                */
40 /*                                                                        */
41 /*    Chaoqiong Xiao, Microsoft Corporation                               */
42 /*                                                                        */
43 /*  DESCRIPTION                                                           */
44 /*                                                                        */
45 /*    This function unregisters a USBX object in the trace registry.      */
46 /*                                                                        */
47 /*  INPUT                                                                 */
48 /*                                                                        */
49 /*    object_pointer                        Address of system object      */
50 /*                                                                        */
51 /*  OUTPUT                                                                */
52 /*                                                                        */
53 /*    None                                                                */
54 /*                                                                        */
55 /*  CALLS                                                                 */
56 /*                                                                        */
57 /*    _tx_trace_object_unregister           Actual unregister function    */
58 /*                                                                        */
59 /*  CALLED BY                                                             */
60 /*                                                                        */
61 /*    USBX delete functions                                               */
62 /*                                                                        */
63 /*  RELEASE HISTORY                                                       */
64 /*                                                                        */
65 /*    DATE              NAME                      DESCRIPTION             */
66 /*                                                                        */
67 /*  05-19-2020     Chaoqiong Xiao           Initial Version 6.0           */
68 /*  09-30-2020     Chaoqiong Xiao           Modified comment(s),          */
69 /*                                            used UX prefix to refer to  */
70 /*                                            TX symbols instead of using */
71 /*                                            them directly,              */
72 /*                                            resulting in version 6.1    */
73 /*  10-15-2021     Chaoqiong Xiao           Modified comment(s),          */
74 /*                                            improved traceX support,    */
75 /*                                            resulting in version 6.1.9  */
76 /*                                                                        */
77 /**************************************************************************/
_ux_trace_object_unregister(VOID * object_ptr)78 VOID  _ux_trace_object_unregister(VOID *object_ptr)
79 {
80 
81 UX_INTERRUPT_SAVE_AREA
82 
83 
84     /* Disable interrupts.  */
85     UX_DISABLE
86 
87     /* Call actual object unregister function.  */
88     _tx_trace_object_unregister(object_ptr);
89 
90     /* Restore interrupts.  */
91     UX_RESTORE
92 }
93 #endif
94